mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
refactor: update migration handling and enhance documentation for updates
This commit is contained in:
parent
f92567acd8
commit
25ab830b4c
2 changed files with 65 additions and 8 deletions
|
|
@ -212,11 +212,10 @@ run_migrations() {
|
|||
echo "✅ Database migrations complete"
|
||||
}
|
||||
|
||||
# Run migrations on first start or when explicitly requested
|
||||
if [ ! -f /data/.migrations_run ] || [ "${FORCE_MIGRATIONS:-false}" = "true" ]; then
|
||||
run_migrations
|
||||
touch /data/.migrations_run
|
||||
fi
|
||||
# Always run migrations on startup - alembic upgrade head is safe to run
|
||||
# every time. It only applies pending migrations (never re-runs applied ones,
|
||||
# never calls downgrade). This ensures updates are applied automatically.
|
||||
run_migrations
|
||||
|
||||
# ================================================
|
||||
# Environment Variables Info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue