Page 1 of 1

Update database scheme?

Posted: Mon 18 Jul 2016 08:53
by steffen_w
Hi,

I wondered if there is a method to update an existing database scheme. I've not found one yet but as there is a way to create a new database, I hope that there is also a similiar method to update it.

If not, what is the recommended way to update a database that does not run on a system I, as the developer, have access to? [Server of a customer for example]

I'm using C#/Devart LinqConnect 5.0.1441.0 with MySQL/MariaDB.

The original change to the database scheme would've been made with the EntityDeveloper.

Re: Update database scheme?

Posted: Tue 19 Jul 2016 10:15
by Shalex
There is no such method as UpdateSchema() for DataContext. We will notify you when the corresponding functionality is implemented. We cannot provide any timeframe at the moment.

Re: Update database scheme?

Posted: Tue 19 Jul 2016 13:55
by steffen_w
Thank you for the fast reply.

Just kind of expected there to be such a method already as it is possible to update the scheme of a SQLite database from C#. (Well, you've to do it per table but it's possible).

Re: Update database scheme?

Posted: Wed 20 Jul 2016 08:05
by Shalex
You are asking for the DataContext.UpdateSchema() functionality for both MySQL and SQLite databases, aren't you? If not, please clarify your previous comments.

Re: Update database scheme?

Posted: Wed 20 Jul 2016 14:03
by steffen_w
Not specifically. I'm asking for a way, any way, to update the scheme of an existing database (adding a new column or table for example).

In SQLite the CreateTable method updates a table if it exists but differs.

For example:
* Create database design and database with EntityDeveloper, create a program that connects to this database
* Change the database design in EntityDeveloper, generate the new C# code but do not update the database
* Inside the program call 'CreateTable' on the table that was changed in the above step

In MySQL I do not have the CreateTable method nor do I seem to have another way to update a database.

Re: Update database scheme?

Posted: Fri 22 Jul 2016 13:51
by Shalex
We will notify you when the corresponding functionality is implemented. We cannot provide any timeframe at the moment.