Upgrading and migration
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 149
Description
### Description
I have updated FlowFuse from 1.13 to 2.4 using the docker-based deployment model and I faced an issue as the `forge-docker` container could not boot up. The logs showed some information about not being able to create some feature as it already exists.
These are the steps I have followed to fix this issue:
- I've search how your migration process is carried out on https://flowfuse.com/docs/contribute/db-migrations/
- I have reviewed the [migration files](https://github.com/FlowFuse/flowfuse/tree/main/forge/db/migrations)
- I have connected to the postgre container then noticed you're not using the standard setup of your migration library `Sequelize`
- I have reviewed which migration files have been processed but were missing
- I've added them to MetaVersions table
- Restarting the container then worked and is now running.
It seems the migration files were executed but Sequelize did not document it correctly into its table. I can't say why.
I could see two areas where there could be an improvement:
- documentation:
- add some information about the specificity of your Sequelize setup in https://flowfuse.com/docs/contribute/db-migrations/ (its table has a different name)
- give some hints in the [upgrading doc](https://flowfuse.com/docs/upgrade/) regarding migrations as it seems db migrations are trouble
- code-wise:
- would it be possible to have in each migration file a check whether the file was already executed and just send a warning instead of having an error like now? I guess this is only feasible for non-breaking changes like adding a new table or a new column.
- have a separate log file just for the upgrading process each time it's detected in your [docker repo](https://github.com/FlowFuse/docker-compose).
Contributor guide
Assessment
This issue has not been assessed yet.