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.
Update database scheme?
Re: Update database scheme?
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?
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).
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?
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?
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.
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?
We will notify you when the corresponding functionality is implemented. We cannot provide any timeframe at the moment.