Skip to content

Commit

Permalink
chore: clean traces of prisma and migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
okjodom committed Nov 8, 2024
1 parent 1c45a82 commit 487ef5f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 77 deletions.
17 changes: 0 additions & 17 deletions apps/swap/package.json

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
12 changes: 0 additions & 12 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,3 @@ $ bun proto:gen
```
Resulting typescript files are generated in the `/libs/common/src/types/proto` folder.
You might need to manually update the index file in the types folder to include the new files.

## Working with Prisma

We use [Prisma](https://prisma.io/) as the ORM for our database.
Each service that uses prisma has a `prisma.schema` file in its corresponding `/src//prisma` folder.
At present, we manually need to gnerate and commit the prisma client whenever the schema is changed.
To do this, run the following command from within the service directory:

```bash
# generate prisma client
$ bun prisma:gen
```
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "bun test apps/api/test/ --config ./apps/api/test/jest-e2e.json",
"proto:gen": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./libs/common/src/types/proto --ts_proto_opt=nestJs=true -I ./proto ./proto/*.proto",
"proto:clean": "rm ./libs/common/src/types/proto/*.ts",
"migrate": "bun ./scripts/migrate.ts"
"proto:clean": "rm ./libs/common/src/types/proto/*.ts"
},
"dependencies": {
"@grpc/grpc-js": "^1.12.2",
Expand All @@ -39,7 +38,6 @@
"@nestjs/platform-express": "^10.0.0",
"@nestjs/sequelize": "^10.0.1",
"@nestjs/swagger": "^7.4.2",
"@prisma/client": "^5.21.1",
"cache-manager": "4.1.0",
"cache-manager-redis-store": "^3.0.1",
"class-transformer": "^0.5.1",
Expand All @@ -52,7 +50,6 @@
"nestjs-pino": "^4.1.0",
"pino-http": "^10.3.0",
"pino-pretty": "^11.3.0",
"prisma": "^5.21.1",
"redis": "^4.7.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
Expand Down
44 changes: 0 additions & 44 deletions scripts/migrate.ts

This file was deleted.

0 comments on commit 487ef5f

Please sign in to comment.