OLD | NEW |
1 # 2009 September 15 | 1 # 2009 September 15 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 foreign key(source_id, parent_id) references TestTable(source_id, id) | 177 foreign key(source_id, parent_id) references TestTable(source_id, id) |
178 ); | 178 ); |
179 CREATE UNIQUE INDEX testindex on TestTable(source_id, id); | 179 CREATE UNIQUE INDEX testindex on TestTable(source_id, id); |
180 PRAGMA foreign_keys=1; | 180 PRAGMA foreign_keys=1; |
181 INSERT INTO TestTable VALUES (1, 'parent', 1, null); | 181 INSERT INTO TestTable VALUES (1, 'parent', 1, null); |
182 INSERT INTO TestTable VALUES (2, 'child', 1, 1); | 182 INSERT INTO TestTable VALUES (2, 'child', 1, 1); |
183 UPDATE TestTable SET parent_id=1000 where id=2; | 183 UPDATE TestTable SET parent_id=1000 where id=2; |
184 } {1 {FOREIGN KEY constraint failed}} | 184 } {1 {FOREIGN KEY constraint failed}} |
185 | 185 |
186 finish_test | 186 finish_test |
OLD | NEW |