Fix for last issue relating to #577

This commit is contained in:
Simon Willison 2023-08-17 16:43:40 -07:00
commit 374506a7ed
2 changed files with 12 additions and 9 deletions

View file

@ -876,7 +876,7 @@ class Database:
for fk in foreign_keys:
if fk.other_table == name and columns.get(fk.other_column):
continue
if not any(
if fk.other_column != "rowid" and not any(
c for c in self[fk.other_table].columns if c.name == fk.other_column
):
raise AlterError(