stack/apps/backend/src/lib
Zai Shi a7acab4646
Auto migration (#526)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!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.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 2c24183879. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-24 02:38:37 +02:00
..
ai-chat Email themes UI fixes (#768) 2025-07-18 10:25:54 -07:00
config.tsx OAuth provider crud (#759) 2025-07-19 02:50:05 +02:00
contact-channel.tsx Tenancies (#418) 2025-02-07 22:54:04 -08:00
email-themes.tsx Email themes UI fixes (#768) 2025-07-18 10:25:54 -07:00
emails.tsx Auto migration (#526) 2025-07-24 02:38:37 +02:00
end-users.tsx Upgrade backend to Next.js 15 (#360) 2024-12-10 00:11:13 -08:00
events.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
freestyle.tsx Vibe coding themes (#755) 2025-07-15 12:06:50 -07:00
internal-api-keys.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
notification-categories.ts Auto migration (#526) 2025-07-24 02:38:37 +02:00
openapi.tsx Update OpenAPI schema generator to support multiple status codes (#527) 2025-03-10 14:50:11 -07:00
permissions.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
projects.tsx Auto migration (#526) 2025-07-24 02:38:37 +02:00
redirect-urls.tsx Fix STACK-BACKEND-63 2025-01-13 10:51:56 -08:00
request-checks.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
tenancies.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
tokens.tsx Source of Truth (#660) 2025-07-11 17:59:03 -07:00
types.tsx Added custom SMTP email server testing on the dashboard (#376) 2024-12-20 19:04:05 +01:00
webhooks.tsx Rename USER to PROJECT in permissions (#576) 2025-03-27 09:39:48 -07:00