System Information
- Strapi Version: 4:
- Database: MySQL:
As you know, a database migration process is necessary for each deployment of a new version that modifies the database schema. I am new to Strapi, and my question is concerning this point.
Knowing that this modification is always done in a visual way from the Strapi admin dashboard (for example by adding a collection or a link between two collections: which generates the creation of a tables at the database level). I imagine it’s faster, easier, and more secure to let the core of Strapi create this db migration file automatically for us. But I don’t know if this already implemented.
Is this currently possible via some configuration setup. Or should we implement this file (as suggested by this page) which could be quite complicated?
If the single way to have database migration files is by writing them from scratch, could you please share your best practice or tricks for that ? For my part I can imagine versioning the schema of the db in sql, before and after the modification and making a comparison of the two files to know what was modified and subsequently implementing it in Knex…
In short, how, guys, are you doing at the moment to manage the migration of the db with each integration of a new version that affects the schema of the db?
THX