Skip to content

Squash migration files up to v1.5.5#15183

Merged
FelixMalfait merged 2 commits intomainfrom
squash-migrations-to-v155
Oct 17, 2025
Merged

Squash migration files up to v1.5.5#15183
FelixMalfait merged 2 commits intomainfrom
squash-migrations-to-v155

Conversation

@FelixMalfait
Copy link
Copy Markdown
Member

Summary

Squash 178 migration files (up to v1.5.5) into 2 consolidated migrations to significantly improve migration performance.

Changes

  • Consolidate 169 common migrations into a single squashed migration
  • Consolidate 11 billing migrations into a single squashed migration
  • Remove 178 files (86% reduction: 207 → 29 migration files)
  • Make FK_47a6c57e1652b6475f8248cff78 constraint DEFERRABLE INITIALLY DEFERRED to fix self-referencing foreign key issues
  • Preserve all 27 post-v1.5.5 migrations (25 common + 2 billing)

Impact

  • 2-3x faster migration execution for new installations
  • Faster dev environment setup (database resets)
  • ✅ Both IS_BILLING_ENABLED=false and true modes tested and verified
  • ✅ All critical tables and constraints verified

Testing

  • Tested migrations from scratch with billing disabled (26 migrations)
  • Tested migrations from scratch with billing enabled (29 migrations)
  • Verified all critical tables exist (workspace, user, fieldMetadata, etc.)
  • Verified all 7 billing tables created correctly when enabled
  • Confirmed DEFERRABLE constraint is properly applied

Files Changed

  • 180 files changed: +443 insertions, -6,462 deletions
  • Net reduction: -6,019 lines of code

- Consolidate 169 common migrations into 1 squashed migration
- Consolidate 11 billing migrations into 1 squashed migration
- Remove 178 migration files (86% reduction: 207 → 29 files)
- Significantly improves migration performance for new installations
- Make FK_47a6c57e1652b6475f8248cff78 constraint DEFERRABLE INITIALLY DEFERRED
- All post-v1.5.5 migrations preserved (25 common + 2 billing)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 17, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:52045

This environment will automatically shut down when the PR is closed or after 5 hours.

@FelixMalfait FelixMalfait merged commit 84e7fab into main Oct 17, 2025
48 of 49 checks passed
@FelixMalfait FelixMalfait deleted the squash-migrations-to-v155 branch October 17, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant