-
Notifications
You must be signed in to change notification settings - Fork 7
Database update function #13
Comments
Not just cols but also complete tables. The same three cases. It might happen that another table is added or one of the existing is deleted. We should take an backup of the data (see #12) before the update so data which might be no longer served is not lost. |
No because, if the developer add or remove or edit cols in a table this the conflict case. New tables in a plugin are easy to handle. They will be added. And tables that no more in update will be delete |
I didn't get your "no because". Your issue is named "Database update function", so new and removed complete tables are part of this function. And in your issue description is nothing said about tables. |
ok i think i implement it by myself... |
So have fun by implement it and take the issue for yourself... I just wanted to say what I think is missing in your issue description. It was just an addition to what you wanted to do so far. The name of the issue is right. This is what the function should do. But in your description (1. comment) you're just talking about columns in a table. You're not saying anything about tables. It could be possible that i add a another table in the next release of my plugin and you have to check this also. So first of all you should compare the tables that exists for far and the tables the plugin want to have now. To have an exampe: And after this step you could take a look at the tables (in this case board) that already existed and now might be changed what was your first idea in this issue. |
the issue name should be database migrations or something alike. while many migrations could be automated there will be cases when that is not possible or takes a huge effort. so there should be a possibility to ship migration files for updates between versions of a plugin, e.g. in plain SQL that works for all four database drivers. this issue will include a lot of work and will need a lot of stuff, so we should decide carefully how and what will be included, e.g. at our next team meeting. |
yes but without this, no plugin updates are available! |
For Plugin updates the database needs method to compare two database.xml files.
If col exists in the first, but not in the second, remove the col.
If col exitsts in the first and in the second do nothing
If col doesnt exists in the first but in the secon add this col
I think thats are all cases.
The text was updated successfully, but these errors were encountered: