stack icon indicating copy to clipboard operation
stack copied to clipboard

Auto migration

Open fomalhautb opened this issue 10 months ago • 2 comments


[!IMPORTANT] Introduces an automated database migration system using Prisma, replacing manual commands with scripts and updating workflows and documentation accordingly.

  • Behavior:
    • Introduces auto-migration system using db-migrations.ts and generate-migration-imports.ts.
    • Replaces manual migration commands with db:init, db:reset, db:seed, and db:migration-gen in package.json.
    • Updates workflows in check-prisma-migrations.yaml and e2e-api-tests.yaml to use new migration commands.
  • Scripts and Utilities:
    • Adds applyMigrations, getMigrationCheckQuery, and runQueryAndMigrateIfNeeded in auto-migrations/index.tsx.
    • Implements getMigrationFiles in auto-migrations/utils.tsx to read migration files.
    • Adds tests in auto-migration.tests.ts to verify migration application and concurrency handling.
  • Misc:
    • Updates .gitignore to exclude migration-files.ts.
    • Modifies README.md and self-host.mdx to reflect new migration commands.
    • Adjusts turbo.json to include new db tasks without caching.

This description was created by Ellipsis for 97673c022d7a311e75e94b219ac29ce4b69c6d0c. It will automatically update as commits are pushed.

fomalhautb avatar Mar 10 '25 06:03 fomalhautb

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:32am
stack-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:32am
stack-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:32am
stack-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:32am

vercel[bot] avatar Mar 10 '25 06:03 vercel[bot]

😱 Found 8 issues. Time to roll up your sleeves! 😱

🗒️ View all ignored comments in this repo
  • The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
  • Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
  • There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.

recurseml[bot] avatar Mar 10 '25 06:03 recurseml[bot]