feat: ship initial DB migration for fresh installs - #14
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds an initial TypeORM migration and enables automatic migration execution in production so fresh installs (notably Docker production mode where synchronize=false) can create the required SQLite tables on first start, addressing issue #13.
Changes:
- Add an initial TypeORM migration that creates the full baseline schema (15 tables).
- Enable automatic migration execution in production via
migrationsRun. - Ignore
docs/superpowers/via.gitignore.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/migration/1774351432650-InitialSchema.ts | Introduces the baseline DB schema migration for fresh installs. |
| server/datasource.ts | Enables production auto-migrations (migrationsRun) to ensure schema exists when synchronize is disabled. |
| .gitignore | Adds ignore rule for docs/superpowers/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Add initial schema migration so fresh Docker installs can create DB tables automatically in production mode. Previously,
synchronizewas alwaysfalsein production and no migration files were shipped, leaving the database empty.server/migration/1774351432650-InitialSchema.tscreating all 15 entity tablesmigrationsRun: truein production inserver/datasource.tsType of change
Checklist
npm run lint)npm test)Related Issues
Fixes #13