mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
docs: update contributing pages (#2503)
This commit is contained in:
parent
3d426b55d3
commit
f984be8ea0
7 changed files with 37 additions and 84 deletions
14
docs/docs/developer/database-migrations.md
Normal file
14
docs/docs/developer/database-migrations.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# 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.
|
||||
|
||||
1. Run the command
|
||||
|
||||
```bash
|
||||
npm run typeorm:migrations:generate ./libs/infra/src/<migration-name>
|
||||
```
|
||||
|
||||
2. Check if the migration file makes sense.
|
||||
3. Move the migration file to folder `server/libs/database/src/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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue