Skip to content

Commit

Permalink
Replace Prisma with Kysely
Browse files Browse the repository at this point in the history
  • Loading branch information
tedspare committed Oct 15, 2024
1 parent 888260e commit 6116c39
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 216 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [2024-10-15] [Replace Prisma with Kysely](https://github.com/RubricLab/memory/commit/fed6f2022cb78052d4afbb1c63d95f40e7e01832)
- [2024-10-15] [Remove temp type](https://github.com/RubricLab/memory/commit/7edd19d51c8b3d0d9f8625e996e4818614e731dd)
- [2024-10-15] [Improve editing ability](https://github.com/RubricLab/memory/commit/c4e105be1a85152af88e77c9b41ef061660e7138)
- [2024-10-15] [Trigger release](https://github.com/RubricLab/memory/commit/cb0a86ef9092c626da76b2aa74fd497afaeb7601)
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
"name": "@rubriclab/memory",
"module": "src/index.ts",
"main": "src/index.ts",
"version": "0.0.30",
"version": "0.0.31",
"private": false,
"type": "module",
"devDependencies": {
"@types/bun": "^1.1.10"
"@types/bun": "^1.1.10",
"kysely-codegen": "^0.16.8",
"pg": "^8.13.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"@ai-sdk/openai": "^0.0.66",
"@prisma/client": "^5.20.0",
"@rubriclab/config": "*",
"@rubriclab/package": "*",
"@t3-oss/env-nextjs": "^0.11.1",
"ai": "^3.4.9",
"chalk": "^5.3.0",
"nanoid": "^5.0.7",
"prisma": "^5.20.0",
"zod": "^3.23.8"
},
"simple-git-hooks": {
Expand All @@ -34,8 +34,8 @@
},
"scripts": {
"prepare": "bun x simple-git-hooks",
"db:generate": "kysely-codegen --include-pattern='public.*'",
"bleed": "bun x npm-check-updates -u",
"db:push": "prisma db push && prisma generate --sql",
"clean": "rm -rf .next && rm -rf node_modules",
"format": "bun x biome format --write .",
"eval": "bun src/evals/index.ts",
Expand Down
46 changes: 0 additions & 46 deletions prisma/schema/facts.prisma

This file was deleted.

10 changes: 0 additions & 10 deletions prisma/schema/schema.prisma

This file was deleted.

1 change: 0 additions & 1 deletion prisma/sql/createVectorExtension.sql

This file was deleted.

1 change: 0 additions & 1 deletion prisma/sql/createVectorIndex.sql

This file was deleted.

13 changes: 0 additions & 13 deletions prisma/sql/searchVector.sql

This file was deleted.

1 change: 0 additions & 1 deletion prisma/sql/setMaxWorkers.sql

This file was deleted.

1 change: 0 additions & 1 deletion prisma/sql/setWorkerMemory.sql

This file was deleted.

6 changes: 6 additions & 0 deletions src/db/scripts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { sql } from 'kysely'

export const createVectorExtension = sql`create extension if not exists vector;`
export const createVectorIndex = sql`create index on tag using hnsw (vector vector_cosine_ops);`
export const setMaxWorkers = sql`set max_parallel_maintenance_workers = 7;`
export const setWorkerMemory = sql`set maintenance_work_mem='10 GB';`
Loading

0 comments on commit 6116c39

Please sign in to comment.