stack/docs/templates
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
..
components Docs updates (#753) 2025-07-11 10:00:02 -07:00
concepts Add an OAuth provider for Twitch (#728) 2025-07-23 02:31:47 +02:00
customization Adds oauth providers, fixes bottom page navigation with mobile suppor… (#726) 2025-07-08 19:51:24 -07:00
getting-started New docs (#698) 2025-06-20 13:30:01 -07:00
others Auto migration (#526) 2025-07-24 02:38:37 +02:00
rest-api New docs (#698) 2025-06-20 13:30:01 -07:00
sdk fix sdk linking issues (#783) 2025-07-21 23:59:16 -07:00
snippets New docs (#698) 2025-06-20 13:30:01 -07:00
faq.mdx Docs updates (#753) 2025-07-11 10:00:02 -07:00
meta.json Docs updates (#753) 2025-07-11 10:00:02 -07:00
overview.mdx New docs (#698) 2025-06-20 13:30:01 -07:00