mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
Added Prisma Optimize
This commit is contained in:
parent
16e21e67d4
commit
a967d989c3
5 changed files with 664 additions and 635 deletions
|
@ -30,6 +30,7 @@ This will also be published on the site some time soon but for now, the roadmap
|
||||||
## Legal
|
## Legal
|
||||||
|
|
||||||
[Privacy Policy](https://tasko-omega.vercel.app/privacy-policy)
|
[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_
|
[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)
|
[License](https://github.com/ahmadk953/tasko/blob/main/LICENCE)
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
import { PrismaClient } from '@prisma/client/edge';
|
import { PrismaClient } from '@prisma/client/edge';
|
||||||
import { withAccelerate } from '@prisma/extension-accelerate';
|
import { withAccelerate } from '@prisma/extension-accelerate';
|
||||||
|
import { withOptimize } from '@prisma/extension-optimize';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
var prisma: PrismaClient | undefined;
|
var prisma: PrismaClient | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const db = new PrismaClient().$extends(withAccelerate());
|
export const db = new PrismaClient()
|
||||||
|
.$extends(withAccelerate())
|
||||||
|
.$extends(withOptimize());
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/eslint-plugin-next": "^14.2.5",
|
"@next/eslint-plugin-next": "^14.2.5",
|
||||||
|
"@prisma/extension-optimize": "^0.10.1",
|
||||||
"@types/lodash": "^4.17.7",
|
"@types/lodash": "^4.17.7",
|
||||||
"@types/node": "^22.4.1",
|
"@types/node": "^22.4.1",
|
||||||
"@types/react": "npm:types-react@rc",
|
"@types/react": "npm:types-react@rc",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
|
previewFeatures = ["tracing"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
|
Loading…
Reference in a new issue