Added Prisma Optimize

This commit is contained in:
Ahmad 2024-08-20 14:24:59 -04:00
parent 16e21e67d4
commit a967d989c3
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
5 changed files with 664 additions and 635 deletions

View file

@ -30,6 +30,7 @@ This will also be published on the site some time soon but for now, the roadmap
## Legal
[Privacy Policy](https://tasko-omega.vercel.app/privacy-policy)
[Terms of Service](https://tasko-omega.vercel.app/terms-of-service) _There is no terms of service yet but, one will be added soon_
[License](https://github.com/ahmadk953/tasko/blob/main/LICENCE)

View file

@ -1,8 +1,11 @@
import { PrismaClient } from '@prisma/client/edge';
import { withAccelerate } from '@prisma/extension-accelerate';
import { withOptimize } from '@prisma/extension-optimize';
declare global {
var prisma: PrismaClient | undefined;
}
export const db = new PrismaClient().$extends(withAccelerate());
export const db = new PrismaClient()
.$extends(withAccelerate())
.$extends(withOptimize());

View file

@ -54,6 +54,7 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^14.2.5",
"@prisma/extension-optimize": "^0.10.1",
"@types/lodash": "^4.17.7",
"@types/node": "^22.4.1",
"@types/react": "npm:types-react@rc",

View file

@ -1,5 +1,6 @@
generator client {
provider = "prisma-client-js"
previewFeatures = ["tracing"]
}
datasource db {

1291
yarn.lock

File diff suppressed because it is too large Load diff