chore(db): migrate from SQLite to PostgreSQL

- Change Prisma provider from sqlite to postgresql
- Replace better-sqlite3 adapter with @prisma/adapter-pg
- Update prisma.config.ts and lib/prisma.ts for PostgreSQL
- Add DATABASE_URL to .env.local
- Regenerate Prisma client for PostgreSQL
- Recreate migrations for PostgreSQL database
This commit is contained in:
jessy-david-dev
2026-04-11 15:50:44 +02:00
parent 5cd32c37e0
commit 875a299cd4
17 changed files with 372 additions and 149 deletions
@@ -733,6 +733,9 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
*/
export const TransactionIsolationLevel = runtime.makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
} as const)
@@ -799,6 +802,14 @@ export const SortOrder = {
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
export const QueryMode = {
default: 'default',
insensitive: 'insensitive'
} as const
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
/**
* Field references
@@ -812,6 +823,13 @@ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel,
/**
* Reference to a field of type 'String[]'
*/
export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
/**
* Reference to a field of type 'Boolean'
*/
@@ -826,6 +844,13 @@ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel
/**
* Reference to a field of type 'DateTime[]'
*/
export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
/**
* Reference to a field of type 'Int'
*/
@@ -833,12 +858,26 @@ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'In
/**
* Reference to a field of type 'Int[]'
*/
export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
/**
* Reference to a field of type 'Float'
*/
export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
/**
* Reference to a field of type 'Float[]'
*/
export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
/**
* Batch Payload for updateMany & deleteMany & createMany
*/