Skip to content

Auto migration#526

Merged
fomalhautb merged 160 commits into
devfrom
auto-migration
Jul 24, 2025
Merged

Auto migration#526
fomalhautb merged 160 commits into
devfrom
auto-migration

Conversation

@fomalhautb
Copy link
Copy Markdown
Contributor

@fomalhautb fomalhautb commented Mar 10, 2025


Important

Introduces an automated database migration system, replacing manual Prisma commands with new scripts and updating workflows, configurations, and tests accordingly.

  • Auto-Migration System:
    • Introduces db-migrations.ts script for handling database migrations automatically.
    • Adds utility functions in utils.tsx for managing migration files.
    • Implements applyMigrations and runMigrationNeeded in index.tsx for executing migrations.
  • Workflow and Scripts:
    • Updates GitHub workflows (check-prisma-migrations.yaml, e2e-api-tests.yaml) to use new migration commands.
    • Replaces prisma migrate commands with db:init, db:migrate, etc., in package.json and README.md.
  • Testing:
    • Adds auto-migration.tests.ts for testing migration logic and concurrency handling.
  • Configuration:
    • Updates .env.development and vitest.config.ts for new environment variables and paths.
    • Modifies turbo.json and package.json to include new migration tasks and scripts.

This description was created by Ellipsis for 2c24183. You can customize this summary. It will automatically update as commits are pushed.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2025

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

Comment thread apps/backend/scripts/db-migrations.ts Outdated
Comment thread apps/backend/scripts/db-migrations.ts Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
Comment thread apps/backend/src/utils/auto-migration.tsx Outdated
@recurseml
Copy link
Copy Markdown

recurseml Bot commented Mar 10, 2025

😱 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.

Comment thread apps/backend/src/prisma-client.tsx Outdated
Comment thread apps/backend/vitest.config.ts
Comment thread apps/backend/vitest.config.ts
Comment thread apps/backend/src/auto-migrations/auto-migration.tests.ts Outdated
Comment thread apps/backend/src/auto-migrations/index.tsx
Comment thread apps/backend/src/auto-migrations/index.tsx Outdated
fomalhautb and others added 3 commits July 22, 2025 20:34
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@N2D4 N2D4 left a comment

Choose a reason for hiding this comment

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

nice!

Comment thread apps/backend/src/auto-migrations/index.tsx
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.

2 participants