Feature/migrate seed.js to TypeScript (#4248)
* feat(db): migrate seed.js to typescript * feat(db): change seed command * Update changelog
This commit is contained in:
parent
657cb510d8
commit
eb26707e8c
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Migrated the database seeding to _TypeScript_
|
||||||
- Upgraded `@trivago/prettier-plugin-sort-imports` from version `4.3.0` to `5.2.1`
|
- Upgraded `@trivago/prettier-plugin-sort-imports` from version `4.3.0` to `5.2.1`
|
||||||
- Upgraded `ng-extract-i18n-merge` from version `2.13.1` to `2.14.1`
|
- Upgraded `ng-extract-i18n-merge` from version `2.13.1` to `2.14.1`
|
||||||
|
|
||||||
|
@ -213,6 +213,6 @@
|
|||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "node prisma/seed.js"
|
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const { PrismaClient } = require('@prisma/client');
|
import { PrismaClient } from '@prisma/client';
|
||||||
|
|
||||||
const prisma = new PrismaClient();
|
const prisma = new PrismaClient();
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
Loading…
x
Reference in New Issue
Block a user