mirror of
https://github.com/immich-app/immich.git
synced 2026-02-04 17:01:13 +03:00
648 B
648 B
Database Migrations
After making any changes in the server/libs/database/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.
- Run the command
npm run typeorm:migrations:generate ./libs/infra/src/<migration-name>
- Check if the migration file makes sense.
- Move the migration file to folder
server/libs/database/src/migrationsin 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.