Skip to content

feat: ship initial DB migration for fresh installs - #14

Merged
Navino16 merged 2 commits into
developfrom
feature/ship-migrations
Mar 24, 2026
Merged

Navino16 merged 2 commits into
developfrom
feature/ship-migrations

Conversation

@Navino16

Copy link
Copy Markdown
Owner

Description

Add initial schema migration so fresh Docker installs can create DB tables automatically in production mode. Previously, synchronize was always false in production and no migration files were shipped, leaving the database empty.

  • Add server/migration/1774351432650-InitialSchema.ts creating all 15 entity tables
  • Enable migrationsRun: true in production in server/datasource.ts

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring
  • Dependencies update

Checklist

  • I have tested my changes locally
  • I have added/updated tests if needed
  • Code coverage is maintained or improved
  • Lint passes (npm run lint)
  • Tests pass (npm test)

Related Issues

Fixes #13

@Navino16 Navino16 added bug Something isn't working javascript Pull requests that update javascript code labels Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 11:33
@codecov-commenter

codecov-commenter commented Mar 24, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 49 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/migration/1774351432650-InitialSchema.ts 0.00% 49 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread server/datasource.ts
Comment thread server/datasource.ts
Comment thread server/migration/1774351432650-InitialSchema.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Navino16
Navino16 merged commit 58b2b3b into develop Mar 24, 2026
11 checks passed
@Navino16
Navino16 deleted the feature/ship-migrations branch March 24, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants