Skip to content

Commit 474c224

Browse files
authored
fix(database): remove comments form dump queries (#3221)
1 parent 7a7b3b2 commit 474c224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/internal/database.server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async function _checkAndImportDatabaseIntegrity(event: H3Event, collection: stri
124124
// so we need to split the SQL and remove the comment
125125
// @see https://github.com/cloudflare/workers-sdk/issues/3892
126126
const hash = dumpLinesHash[index]
127-
const statement = sql.substring(0, -hash.length - 4)
127+
const statement = sql.substring(0, sql.length - hash.length - 4)
128128

129129
// If the structure has not changed,
130130
// skip any insert/update line whose hash is already in the database.

0 commit comments

Comments
 (0)