Repository navigation
Commit 106d7cb
committed
Leave generated columns out of Export to SQL
Export > Database to SQL file wrote every column into the INSERT
statements, including generated columns. SQLite refuses to insert into a
generated column, so importing the file failed with "table X has N columns
but M values were supplied", or with "cannot INSERT into generated column"
when column names were kept.
Only for tables that have generated columns, select and insert the other
columns instead, the same as the sqlite3 shell's .dump. The generated values
are recomputed on import. Other tables still export with SELECT *.
Fixes #29781 parent 9ccf550 commit 106d7cb
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
| 993 | + | |
| 994 | + | |
993 | 995 | | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
994 | 1006 | | |
995 | 1007 | | |
996 | 1008 | | |
| |||
0 commit comments