File tree Expand file tree Collapse file tree 3 files changed +74
-73
lines changed Expand file tree Collapse file tree 3 files changed +74
-73
lines changed Original file line number Diff line number Diff line change 73
73
"lucia" : " ^2.7.7" ,
74
74
"lucide-react" : " ^0.314.0" ,
75
75
"luxon" : " ^3.5.0" ,
76
- "next" : " ^14.2.12 " ,
76
+ "next" : " ^14.2.16 " ,
77
77
"nuqs" : " ^1.19.1" ,
78
78
"ohash" : " ^1.1.4" ,
79
79
"papaparse" : " ^5.4.1" ,
Original file line number Diff line number Diff line change @@ -33,25 +33,26 @@ function checkForNeededMigrations() {
33
33
}
34
34
}
35
35
36
- async function handleMigrations ( ) {
37
- /**
38
- * This function checks if the database is in a state where the workaround is needed.
39
- *
40
- * The workaround is needed when the database is not empty and the _prisma_migrations
41
- * table does not exist.
42
- */
43
- async function shouldApplyWorkaround ( ) {
44
- const tables = await prisma . $queryRaw `
36
+ /**
37
+ * This function checks if the database is in a state where the workaround is needed.
38
+ *
39
+ * The workaround is needed when the database is not empty and the _prisma_migrations
40
+ * table does not exist.
41
+ */
42
+ async function shouldApplyWorkaround ( ) {
43
+ const tables = await prisma . $queryRaw `
45
44
SELECT table_name
46
45
FROM information_schema.tables
47
46
WHERE table_schema = 'public' AND table_type = 'BASE TABLE'` ;
48
47
49
- const databaseNotEmpty = tables . length > 0 ;
50
- const migrationsTableExists = tables . some ( table => table . table_name === '_prisma_migrations' ) ;
48
+ const databaseNotEmpty = tables . length > 0 ;
49
+ const migrationsTableExists = tables . some ( table => table . table_name === '_prisma_migrations' ) ;
51
50
52
51
53
- return ! migrationsTableExists && databaseNotEmpty ;
54
- }
52
+ return ! migrationsTableExists && databaseNotEmpty ;
53
+ }
54
+
55
+ async function handleMigrations ( ) {
55
56
56
57
try {
57
58
if ( await shouldApplyWorkaround ( ) ) {
You can’t perform that action at this time.
0 commit comments