Commit 9f77d72
Fix sqlite_import() to handle CREATE TRIGGER and CREATE VIEW in dumps
sqlite3 .dump also outputs CREATE TRIGGER and CREATE VIEW statements
without IF NOT EXISTS, causing re-import to fail with "already exists".
Extend the transformations to add IF NOT EXISTS to all CREATE
statements (TABLE, TRIGGER, VIEW, INDEX, UNIQUE INDEX) using regex,
so that re-importing a dump into the same database succeeds.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>1 parent a6ff503 commit 9f77d72
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
430 | 432 | | |
431 | 433 | | |
432 | 434 | | |
| |||
0 commit comments