fix: run DB migrations automatically at backend startup
Instead of relying on a manual `pnpm db:migrate` step (which was connecting to a different postgres than the Docker container), the backend now calls drizzle migrate() before the server starts. This ensures migrations always run against the correct database on startup. Also fixes the Dockerfile to copy migrations into dist/migrations so the path resolves correctly in the compiled output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,13 @@
|
||||
"when": 1741337600000,
|
||||
"tag": "0002_remove_archived_recording_status",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 3,
|
||||
"version": "7",
|
||||
"when": 1741420000000,
|
||||
"tag": "0003_model_photo",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user