Skip to content

Commit

Permalink
(feat): Enable having multiple schema files for prisma before prisma/…
Browse files Browse the repository at this point in the history
…prisma#2377 is resolved through prisma-multischema
  • Loading branch information
mathiasberggren committed Apr 9, 2024
1 parent fdc4387 commit 2abb199
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 2 additions & 0 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"db:generate": "npx prisma-multischema generate",
"db:migrate": "npx prisma migrate dev",
"db:deploy": "npx prisma migrate deploy",
"console": "npm run start -- --watch --entryFile repl"
Expand Down Expand Up @@ -57,6 +58,7 @@
"jest": "^29.7.0",
"prettier": "^3.0.0",
"prisma": "^5.11.0",
"prisma-multischema": "^1.1.4",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions apps/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//🧩Don't Edit this file.✨Generated in Tue Apr 09 2024 20:47:08 GMT+0200 (Central European Summer Time)✨
model Movie {
id Int @id @default(autoincrement())
title String
director String
createdAt DateTime @default(now())
}
6 changes: 6 additions & 0 deletions apps/api/prisma/subschemas/movies.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
model Movie {
id Int @id @default(autoincrement())
title String
director String
createdAt DateTime @default(now())
}
14 changes: 0 additions & 14 deletions apps/api/src/database/schema.prisma

This file was deleted.

0 comments on commit 2abb199

Please sign in to comment.