Showing results for 
Search instead for 
Did you mean: 

CAP "schema_evolution": "auto" with SQLite does not work?

Active Contributor
0 Kudos

Hello Experts,

Tried to run cds deploy with SQLite3 db with option "schema_evolution": "auto". I am using "dummy" authorisation.

cds version: 7.7.0

swlite3 version: 5.1.7

Do you know if it is supposed to work at all?

Currently, I get this error:

[Error: SQLITE_ERROR: table ... already exists in:


View Entire Topic
Active Contributor

I figured this out: deleting the old db file and deploying the db with   schema_evolution set to auto was necessary.

In this case, an additional table will be created in the db:
CREATE TABLE cds_model (csn CLOB);

The single entry in this table contains the whole model in JSON format, so if necessary, it's possible to repair the schema_evolution process manually by creating this table and filling it with the old CSN representation.

I would recommend though checking the situation when the schema_evolution has an "auto" value and  the cds_model table does not exist; in this case the error message should clearer. 


0 Kudos

You can migrate to schema_evolution:auto with command cds deploy --model-only. You should do this before making changes to model that deviates from what is deployed.