Illegal Statement Error When Trying to Patch an Apprenda Hosted Database


A developer asked the question on how to patch his database deployed by Apprenda. In this particular case, he was trying to modify the structure of some tables and the data stored in them. When uploading the archive he received a message that said:

Illegal statement. Insert statements not allowed.


The response from the support staff was the following:

There are a couple of issues.

  1. You need to break the scripts into three different scripts. Schema patches cannot modify data and data patches cannot modify schema.
  2. The data patch that you sent me won't work because you are trying to insert data with a key that already exists.


Have more questions? Submit a request