Page 1 of 1
Creation of Data Member in the DB
Posted: Tue 13 Mar 2018 13:33
by Ekki
Hi all,
in case of a backward-compatiblity scenario I want to add a data member/table column in case it's not there yet. Is this possible via the PostgreSQL interface?
Thx for any feedback,
Ekki
Re: Creation of Data Member in the DB
Posted: Thu 15 Mar 2018 14:14
by Shalex
You are using the LinqConnect feature and want to update the database structure basing on the changes in the *.lqml model. Is this correct? In this case, right click *.lqml in Solution Explorer > Open With > Entity Developer, then right click the diagram > Update To Database and follow the wizard steps. Does this help?
Re: Creation of Data Member in the DB
Posted: Wed 21 Mar 2018 14:44
by Ekki
Thx but it's a little bit different.
I'm looking for a way that my application can do this automatically. If possible I want to avoid to migrate dozens of databases manually. Rather the application should check if a certain column is already there and if not, create it.
In case this is possible, pls guide me.
Thx,
Ekki
Re: Creation of Data Member in the DB
Posted: Thu 22 Mar 2018 15:49
by Shalex
The LinqConnect engine doesn't allow to update a database structure in runtime, only context.DeleteDatabase() and context.CreateDatabase().
You can use the following approach for updating multiple databases with the same structure: run the "Update To Database" wizard of Entity Developer to get the update SQL on the "View and execute script" step (the Script tab), then you can execute this SQL via plain ADO.NET code connecting to different databases.
Re: Creation of Data Member in the DB
Posted: Mon 26 Mar 2018 10:29
by Ekki
Thx. Closed.