This is a migrated thread and some comments may be shown as answers.

CreateDDLScript and CreateUpdateDDLScript generate incorrect update

1 Answer 24 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mikhail
Top achievements
Rank 1
Mikhail asked on 14 Aug 2015, 02:38 PM

Hi.

I'm using Telerik Data Access 2015.1.225.1 with SQLite. I want to automatically update SQLIte database with Data Access builtin migrations. For this I use CreateDDLScript and CreateUpdateDDLScript. Both of theme generate incorrect create\update SQL. Only part of my tables are included in generated script.

I've got small number of tables and very simple relationships between them. Here is my structure (of course without names) - http://imgur.com/HusHtxN. 

What should I try? Or Data Access can't correctly generate create\update scripts for SQLite?

1 Answer, 1 is accepted

Sort by
0
Pavel Uzunov
Telerik team
answered on 20 Aug 2015, 05:46 AM
Hello Mikhail,

Based on the provided sceenshot I see that you are creating your model in our Visual Designer. In this case, in order to use the CreateateDDLScript and CreateUpdateDDLScript methods you need to set the Update Schema property of each of the persistent classes to True. Once you do this, you need to explicitly save the model, in order to trigger the code generation templates. At this point, you can run your logic for test. The outcome should be a correct script.

In case you notice that the generated script still has problems, let us know.

I hope this helps.

Regards,
Pavel Uzunov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
Data Access Free Edition
Asked by
Mikhail
Top achievements
Rank 1
Answers by
Pavel Uzunov
Telerik team
Share this question
or