mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-17 08:34:19 +01:00
Including tests
This commit is contained in:
@@ -44,3 +44,15 @@ do_execsql_test_on_specific_db {:memory:} drop-index-after-ops-1 {
|
|||||||
DROP INDEX t_idx6;
|
DROP INDEX t_idx6;
|
||||||
SELECT count(*) FROM sqlite_schema WHERE type='index' AND name='t_idx6';
|
SELECT count(*) FROM sqlite_schema WHERE type='index' AND name='t_idx6';
|
||||||
} {0}
|
} {0}
|
||||||
|
|
||||||
|
# Test dropping of indices associated with unique or primary contraint indices produces an error
|
||||||
|
do_execsql_test_in_memory_error_content drop-index-primary-key-index {
|
||||||
|
CREATE TABLE t15a (id TEXT PRIMARY KEY );
|
||||||
|
DROP INDEX sqlite_autoindex_t15a_1;
|
||||||
|
} {"index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped"}
|
||||||
|
|
||||||
|
|
||||||
|
do_execsql_test_in_memory_error_content drop-index-unique-index {
|
||||||
|
CREATE TABLE t15b (id INT UNIQUE );
|
||||||
|
DROP INDEX sqlite_autoindex_t15b_1;
|
||||||
|
} {"index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped"}
|
||||||
Reference in New Issue
Block a user