mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 17:05:36 +01:00
Merge 'BTreeTable::to_sql: wrap special column names in brackets' from Nils Koch
Closes #2055 Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #2126
This commit is contained in:
@@ -95,6 +95,18 @@ do_execsql_test_on_specific_db {:memory:} alter-table-drop-column {
|
||||
"3"
|
||||
}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} alter-table-drop-column-special-name {
|
||||
CREATE TABLE t(a, b, [c c]);
|
||||
INSERT INTO t VALUES (1, 2, 3);
|
||||
ALTER TABLE t DROP COLUMN b;
|
||||
|
||||
SELECT "c c" FROM t;
|
||||
SELECT sql FROM sqlite_schema;
|
||||
} {
|
||||
3
|
||||
"CREATE TABLE t (a, [c c])"
|
||||
}
|
||||
|
||||
do_execsql_test_in_memory_any_error fail-alter-table-drop-unique-column {
|
||||
CREATE TABLE t(a, b UNIQUE);
|
||||
ALTER TABLE t DROP b;
|
||||
|
||||
Reference in New Issue
Block a user