(executor)
| 137 | |
| 138 | @dbtest |
| 139 | def test_foreign_key_query(executor): |
| 140 | run(executor, "create schema schema1") |
| 141 | run(executor, "create schema schema2") |
| 142 | run(executor, "create table schema1.parent(parentid int PRIMARY KEY)") |
| 143 | run( |
| 144 | executor, |
| 145 | "create table schema2.child(childid int PRIMARY KEY, motherid int REFERENCES schema1.parent)", |
| 146 | ) |
| 147 | |
| 148 | assert set(executor.foreignkeys()) >= {("schema1", "parent", "parentid", "schema2", "child", "motherid")} |
| 149 | |
| 150 | |
| 151 | @dbtest |
nothing calls this directly
no test coverage detected