correction prisma.ts avec erreur sur pg module

This commit is contained in:
2026-03-02 10:00:40 +01:00
parent 8ab55d71e7
commit 86f863ddcf
5 changed files with 130 additions and 2 deletions

4
.gitignore vendored
View File

@@ -6,8 +6,8 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
#*.next
#.next/*
*.next
.next/*
node_modules
dist

Binary file not shown.

View File

@@ -1946,3 +1946,105 @@ FAM | META SEQ | SST SEQ | RANGE
0 | 00001731 | 00001730 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001732 | 00001728 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
2 | 00001733 | 00001729 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
Time 2026-02-28T19:29:33.6461094Z
Commit 00001739 4 keys in 7ms 68µs 100ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001737 | 00001736 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001738 | 00001734 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
2 | 00001739 | 00001735 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
Time 2026-02-28T19:29:36.3133241Z
Commit 00001745 4 keys in 7ms 458µs 400ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001743 | 00001742 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001744 | 00001740 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
2 | 00001745 | 00001741 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
Time 2026-02-28T19:41:11.8237278Z
Commit 00001751 4 keys in 8ms 44µs 600ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001749 | 00001748 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001750 | 00001746 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001751 | 00001747 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T19:42:15.8427482Z
Commit 00001757 4 keys in 7ms 491µs
FAM | META SEQ | SST SEQ | RANGE
0 | 00001755 | 00001754 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001756 | 00001752 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001757 | 00001753 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T19:57:40.1943652Z
Commit 00001763 4 keys in 6ms 70µs 500ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001761 | 00001760 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001762 | 00001758 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001763 | 00001759 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T19:57:55.0659041Z
Commit 00001769 4 keys in 7ms 699µs 600ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001767 | 00001766 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001768 | 00001764 SST | O | a39cd83271c2325b-a39cd83271c2325b (0 MiB, fresh)
2 | 00001769 | 00001765 SST | O | a39cd83271c2325b-a39cd83271c2325b (0 MiB, fresh)
Time 2026-02-28T19:58:53.6533804Z
Commit 00001775 4 keys in 16ms 444µs 400ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001773 | 00001772 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001774 | 00001770 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001775 | 00001771 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:04:30.0938169Z
Commit 00001781 4 keys in 8ms 68µs 700ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001779 | 00001778 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001780 | 00001776 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001781 | 00001777 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:09:37.533161Z
Commit 00001787 4 keys in 15ms 701µs 300ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001785 | 00001784 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001786 | 00001782 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001787 | 00001783 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:26:51.6418022Z
Commit 00001793 4 keys in 7ms 102µs 900ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001791 | 00001790 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001792 | 00001788 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001793 | 00001789 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:28:20.9947614Z
Commit 00001799 4 keys in 16ms 366µs 500ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001797 | 00001796 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001798 | 00001794 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001799 | 00001795 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:29:53.8001793Z
Commit 00001805 4 keys in 17ms 793µs 800ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001803 | 00001802 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001804 | 00001801 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001805 | 00001800 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:31:23.8986709Z
Commit 00001811 4 keys in 7ms 88µs 400ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001809 | 00001808 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001810 | 00001806 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001811 | 00001807 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:33:54.0466437Z
Commit 00001817 4 keys in 16ms 22µs 600ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001815 | 00001814 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
2 | 00001816 | 00001813 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
1 | 00001817 | 00001812 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:39:33.9122118Z
Commit 00001823 4 keys in 17ms 235µs 900ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001821 | 00001820 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001822 | 00001818 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001823 | 00001819 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:43:54.5880139Z
Commit 00001829 4 keys in 16ms 919µs 800ns
FAM | META SEQ | SST SEQ | RANGE
0 | 00001827 | 00001826 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
2 | 00001828 | 00001825 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
1 | 00001829 | 00001824 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
Time 2026-02-28T20:45:23.0248567Z
Commit 00001835 4 keys in 8ms 432µs
FAM | META SEQ | SST SEQ | RANGE
0 | 00001833 | 00001832 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
1 | 00001834 | 00001831 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)
2 | 00001835 | 00001830 SST | O | b294a4237ccef201-b294a4237ccef201 (0 MiB, fresh)

View File

View File

@@ -1,3 +1,29 @@
/*import { PrismaClient } from '@prisma/client';
import { PrismaPg } from '@prisma/adapter-pg';
import { Pool } from 'pg';
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};
*/
/**
* Returns a singleton PrismaClient instance using the Prisma v7 adapter pattern.
* Uses @prisma/adapter-pg with a pg Pool for direct PostgreSQL connections.
*//*
export function getDB(): PrismaClient {
if (!globalForPrisma.prisma) {
const connectionString = process.env.DATABASE_URL;
const pool = new Pool({ connectionString });
const adapter = new PrismaPg(pool);
globalForPrisma.prisma = new PrismaClient({ adapter });
}
return globalForPrisma.prisma;
}
export default getDB;
*/
import { PrismaClient } from '@prisma/client';
import { PrismaPg } from '@prisma/adapter-pg';
import { Pool } from 'pg';