mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-28 12:54:15 +02:00
Loop through correct list
This commit is contained in:
parent
889e2afccf
commit
fc81588cc3
1 changed files with 1 additions and 1 deletions
|
|
@ -289,7 +289,7 @@ class Database:
|
||||||
|
|
||||||
# Construct SQL for use with "UPDATE sqlite_master SET sql = ? WHERE name = ?"
|
# Construct SQL for use with "UPDATE sqlite_master SET sql = ? WHERE name = ?"
|
||||||
table_sql = {}
|
table_sql = {}
|
||||||
for table, column, other_table, other_column in foreign_keys:
|
for table, column, other_table, other_column in foreign_keys_to_create:
|
||||||
old_sql = table_sql.get(table, self[table].schema)
|
old_sql = table_sql.get(table, self[table].schema)
|
||||||
extra_sql = ",\n FOREIGN KEY({column}) REFERENCES {other_table}({other_column})\n".format(
|
extra_sql = ",\n FOREIGN KEY({column}) REFERENCES {other_table}({other_column})\n".format(
|
||||||
column=column, other_table=other_table, other_column=other_column
|
column=column, other_table=other_table, other_column=other_column
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue