CreateDDLScript and CreateUpdateDDLScript generate incorrect update

Thread is closed for posting
2 posts, 0 answers
  1. Mikhail
    Mikhail avatar
    2 posts
    Member since:
    Aug 2014

    Posted 14 Aug 2015 Link to this post


    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) - 

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

  2. Pavel Uzunov
    Pavel Uzunov avatar
    14 posts

    Posted 20 Aug 2015 Link to this post

    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.

    Pavel Uzunov
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Back to Top