-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Only merge using a merge commit!**
- Loading branch information
Showing
5 changed files
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
# Changing database schema | ||
|
||
1. Update `schema.prisma` | ||
2. Start local database: `docker compose up` | ||
3. Update local database: `npx prisma db push` | ||
4. Commit and push everything to develop | ||
5. Update stage database: `DATABASE_URL= npx prisma db push` | ||
6. Run production deployment | ||
7. Update production database: `DATABASE_URL= npx prisma db push` | ||
1. Update `schema.prisma` as required | ||
2. Run `npx prisma db push` | ||
3. Create migration `npx prisma migrate dev --name my-migration` | ||
4. Commit | ||
5. Apply to other developer databases: `npx prisma migrate dev` | ||
6. Apply to production databases: `DATABASE_URL=... npx prisma migrate deploy` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.