mirror of
https://github.com/immich-app/immich.git
synced 2026-02-09 03:08:53 +03:00
* Add AssetJobStatus * fentity * Add jobStatus field to AssetEntity * Fix the migration doc paths * Filter on facesRecognizedAt * Set facesRecognizedAt field * Test for facesRecognizedAt * Done testing * Adjust FK properties * Add tests for WithoutProperty.FACES * chore: non-nullable --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
15 lines
638 B
Markdown
15 lines
638 B
Markdown
# Database Migrations
|
|
|
|
After making any changes in the `server/src/infra/database/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.
|
|
|
|
1. Run the command
|
|
|
|
```bash
|
|
npm run typeorm:migrations:generate ./src/infra/<migration-name>
|
|
```
|
|
|
|
2. Check if the migration file makes sense.
|
|
3. Move the migration file to folder `./server/src/infra/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.
|