1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix the parse.sql output file so that it is readable into a database where

foreign keys are enforced.

FossilOrigin-Name: 3a82c554c3bde4640df6865686f8f70e2c1e07c581fed4772b6b0a8ec1b10bb6
This commit is contained in:
drh
2019-11-29 12:51:00 +00:00
parent 2ecf928ea9
commit 1417c2f77f
3 changed files with 11 additions and 8 deletions

View File

@ -4189,11 +4189,13 @@ void ReportTable(
return;
}
fprintf(sql,
"BEGIN;\n"
"CREATE TABLE symbol(\n"
" id INTEGER PRIMARY KEY,\n"
" name TEXT NOT NULL,\n"
" isTerminal BOOLEAN NOT NULL,\n"
" fallback INTEGER REFERENCES symbol\n"
" fallback INTEGER REFERENCES symbol"
" DEFERRABLE INITIALLY DEFERRED\n"
");\n"
);
for(i=0; i<lemp->nsymbol; i++){
@ -4244,6 +4246,7 @@ void ReportTable(
}
}
}
fprintf(sql, "COMMIT;\n");
}
lineno = 1;
tplt_xfer(lemp->name,in,out,&lineno);