immich
immich copied to clipboard
feat(server): env variable to skip migrations on startup
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.
Deploying immich with
Cloudflare Pages
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 DB_URL
is defined, the other database (DB_*
) variables are ignored, with the exception of DB_VECTOR_EXTENSION
." The same note is in the pre existing Postgres docs.
Ty. Can we update line 76 in backup and restore which states "When
DB_URL
is defined, the other database (DB_*
) variables are ignored, with the exception ofDB_VECTOR_EXTENSION
." The same note is in the pre existing Postgres docs.
Good catch! I changed it to just list the relevant variables so it won't get outdated as more variables are added.
Ty. Can we update line 76 in backup and restore which states "When
DB_URL
is defined, the other database (DB_*
) variables are ignored, with the exception ofDB_VECTOR_EXTENSION
." The same note is in the pre existing Postgres docs.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.