Skip to content

Commit 632881f

Browse files
committed
Remove the database prisma dev command, since we need to use create only now. Updated docs
1 parent 9c28bde commit 632881f

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,21 @@ pnpm run db:studio
230230
cd packages/database
231231
```
232232

233-
3. Create and apply the migrations
233+
3. Create a migration
234234

235235
```
236-
pnpm run db:migrate:dev
236+
pnpm run db:migrate:dev:create
237237
```
238238

239-
This creates a migration file and executes the migrations against your database and applies changes to the database schema(s)
239+
This creates a migration file. Check the migration file does only what you want. If you're adding any database indexes they must use `CONCURRENTLY`, otherwise they'll lock the table when executed.
240+
241+
4. Run the migration.
242+
243+
```
244+
pnpm run db:migrate:deploy
245+
pnpm run generate
246+
```
247+
This executes the migrations against your database and applies changes to the database schema(s), and then regenerates the Prisma client.
240248

241249
4. Commit generated migrations as well as changes to the schema.prisma file
242250
5. If you're using VSCode you may need to restart the Typescript server in the webapp to get updated type inference. Open a TypeScript file, then open the Command Palette (View > Command Palette) and run `TypeScript: Restart TS server`.

internal-packages/database/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"scripts": {
1414
"generate": "prisma generate",
15-
"db:migrate:dev": "prisma migrate dev",
1615
"db:migrate:dev:create": "prisma migrate dev --create-only",
1716
"db:migrate:deploy": "prisma migrate deploy",
1817
"db:push": "prisma db push",

0 commit comments

Comments
 (0)