feat: initial kysely migration file ()

This commit is contained in:
Jason Rasmussen 2025-04-17 17:38:47 -04:00 committed by GitHub
parent e275f2d8b3
commit 6474a78b8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 499 additions and 139 deletions
docs/docs/developer

View file

@ -1,14 +1,14 @@
# Database Migrations
After making any changes in the `server/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
After making any changes in the `server/src/schema`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
1. Run the command
```bash
npm run typeorm:migrations:generate <migration-name>
npm run migrations:generate <migration-name>
```
2. Check if the migration file makes sense.
3. Move the migration file to folder `./server/src/migrations` in your code editor.
3. Move the migration file to folder `./server/src/schema/migrations` in your code editor.
The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately.