Skip to content

Commit 4983443

Browse files
authored
fix(nuxthub): missing line separator in database migrations (#3464)
1 parent 96bd134 commit 4983443

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/presets/nuxthub.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ export default definePreset({
3434
await mkdir(resolve(nitroConfig.rootDir!, '.data/hub/database/queries'), { recursive: true })
3535
let i = 1
3636
// Drop info table and prepare for new dump
37-
let dump = 'DROP TABLE IF EXISTS _content_info;\n'
37+
let dump = 'DROP TABLE IF EXISTS _content_info;'
3838
const dumpFiles: Array<{ file: string, content: string }> = []
3939
Object.values(options.manifest.dump).forEach((value) => {
4040
value.forEach((line) => {
4141
if ((dump.length + line.length) < 1000000) {
42-
dump += line + '\n'
42+
dump += '\n' + line
4343
}
4444
else {
4545
dumpFiles.push({ file: `content-database-${String(i).padStart(3, '0')}.sql`, content: dump.trim() })

0 commit comments

Comments
 (0)