-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🗃️ Issue #3540 db migration #3543
base: 5.2
Are you sure you want to change the base?
Conversation
5bf05a5
to
2c0288b
Compare
61266a4
to
1529cba
Compare
3809593
to
d78d246
Compare
This PR is ready to review. Sorry for the noise during the development ;-) |
d78d246
to
d6d516a
Compare
Related issue #3021 |
Hii @macintoshplus, the migrations are dropping tables first before re-creating them. What if I have data in those tables that needs to be preserved? |
The migration does not remove existing tables and data. It's the goal to use migrations. Bolt can used with various DBMSs like SQLite (used in test mainly), MariaDB/MySQL, or Postgres. Generating one migration for 3 DBMSs is so hard. However using migration is necessary to manage changes with data effect. In this PR, I have added the database dumps for MySQL/MariaDB to enable the migration tests and check if no change has been lost in migrations. |
I am sorry if I misunderstood this PR then. So can I now safely upgrade from Bolt 5.1 to the latest 5.2.2 and run (how please?) DB migrations or should I wait for this PR to be merged? |
You have 2 choices:
To execute migration run this command: |
This PR fixes issue #3540 and updates the Doctrine migrations to update MySQL/MariaDB database from Bolt version 4.2, 5.0, and 5.1.
A GitHub Action workflow has been added to check if migration is missing in the future (only for MySQL/MariaDB).