-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(server): env variable to skip migrations on startup #9069
Conversation
Deploying immich with
|
Latest commit: |
8d4d2b5
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a72a8ba7.immich.pages.dev |
Branch Preview URL: | https://feat-skip-migrations.immich.pages.dev |
Ty. Can we update line 76 in backup and restore which states "When |
Good catch! I changed it to just list the relevant variables so it won't get outdated as more variables are added. |
Ty! I misspoke its also on line 76 of env vars docs that also contains the same language. I like switching to explicitly saying which ones are ignored. |
|
||
:::info | ||
|
||
When `DB_URL` is defined, the other database (`DB_*`) variables are ignored, with the exception of `DB_VECTOR_EXTENSION`. | ||
When `DB_URL` is defined, the `DB_HOSTNAME`, `DB_PORT`, `DB_USERNAME`, `DB_PASSWORD` and `DB_DATABASE_NAME` database variables are ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty!
Description
Some deployment methods, like Portainer and TrueNAS SCALE, make it difficult to start the database without starting everything else as well. This makes it awkward to restore from a backup as the server will run migrations that then cause duplicate key violations, etc.
This PR adds an env variable to ease this process, skipping migrations to allow the admin to restore to a clean database.