mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-04 08:24:20 +02:00
Simplify drop-foreign-key, and drop_foreign_keys, closes #177
This commit is contained in:
parent
d13c123100
commit
5a63b9e88c
6 changed files with 6 additions and 18 deletions
|
|
@ -274,12 +274,7 @@ def test_transform_drop_foreign_keys(fresh_db, use_pragma_foreign_keys):
|
|||
),
|
||||
]
|
||||
# Drop two of those foreign keys
|
||||
fresh_db["places"].transform(
|
||||
drop_foreign_keys=(
|
||||
("country", "country", "id"),
|
||||
("continent", "continent", "id"),
|
||||
)
|
||||
)
|
||||
fresh_db["places"].transform(drop_foreign_keys=("country", "continent"))
|
||||
# Should be only one foreign key now
|
||||
assert fresh_db["places"].foreign_keys == [
|
||||
ForeignKey(table="places", column="city", other_table="city", other_column="id")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue