Open Nils85 opened 3 years ago
Does auto-upgrading involve the retention of existing database data?
Yes, it is the whole point of this feature: Being able to upgrade the schema and update existing data without any action from the system administrator.
But this is not only related to the Pull Request #144, it will be used for all future features that need to create new tables or change columns, foreign keys... For now, with the PR #144, I will apply all changes by executing SQL queries directly in the database. But one day it should be good to have something automatic...
Let me think on paper about how to 'safely' automate this without loosing data. If there is some lead on how to go about it, I would appreciate.
Well, actually I already know how to do that, I just didn't have the time to implement it before in the DataAccess Model. So I created this issue as a reminder for me...
When we create a new table or change a column in an existing table we always need to execute the modifications on the database manually with SQL before updating the WebApp itself. Which is logic but not convenient.
This part should be automatic by creating an "Upgrader" class in the
DataAccess
namespace.