Skip to content

Commit

Permalink
feat(generators/with-postgres-prisma): add pluralize module, fix pris…
Browse files Browse the repository at this point in the history
…ma:db-push & :db-seed scripts, add model x db table name mapping
  • Loading branch information
phatpham9 committed Feb 15, 2021
1 parent 3a915be commit 64f5b14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions generators/with-postgres-prisma/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"scripts": {
"prisma": "node_modules/.bin/prisma",
"prisma:db-push": "yarn prisma:db push --schema src/db/postgres.prisma --preview-feature",
"prisma:db-seed": "yarn prisma:db seed --schema src/db/postgres.prisma --preview-feature",
"prisma:db-push": "yarn prisma db push --schema src/db/postgres.prisma --preview-feature",
"prisma:db-seed": "yarn prisma db seed --schema src/db/postgres.prisma --preview-feature",
"prisma:generate": "yarn prisma generate --schema src/db/postgres.prisma",
"prisma:generate-watch": "yarn prisma:generate --watch",
"postinstall": "yarn prisma:generate",
Expand All @@ -39,6 +39,7 @@
"express": "*",
"http-status-codes": "*",
"morgan": "*",
"pluralize": "*",
"source-map-support": "*",
"yup": "*"
},
Expand All @@ -48,6 +49,7 @@
"@boringcodes/prettier-config": "*",
"@types/express": "*",
"@types/morgan": "*",
"@types/pluralize": "*",
"@types/yup": "*",
"@typescript-eslint/eslint-plugin": "*",
"@typescript-eslint/parser": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ generator client {
}

model Thing {
@@map(name: "things")
id Int @id @default(autoincrement())
name String?
}

0 comments on commit 64f5b14

Please sign in to comment.