Browse Source

Feature/migrate seed.js to TypeScript (#4248)

* feat(db): migrate seed.js to typescript

* feat(db): change seed command

* Update changelog
pull/4218/head
Ken Tandrian 4 days ago
committed by GitHub
parent
commit
eb26707e8c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 2
      package.json
  3. 3
      prisma/seed.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Migrated the database seeding to _TypeScript_
- 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`

2
package.json

@ -213,6 +213,6 @@
"node": ">=20"
},
"prisma": {
"seed": "node prisma/seed.js"
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
}

3
prisma/seed.js → prisma/seed.ts

@ -1,4 +1,5 @@
const { PrismaClient } = require('@prisma/client');
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
Loading…
Cancel
Save