sqlite-utils/sqlite_utils
Simon Willison e1ca938aa1 table.add_foreign_key(column, other_table, other_column)
New mechanism for adding foreign key constraints to an existing SQLite
table.

SQLite ALTER TABLE does not support this out-of-the-box, so I instead
had to write some careful code that uses PRAGMA writable_schema = 1 to
directly modify the sqlite_master table.

Refs #2
2019-02-24 13:10:51 -08:00
..
__init__.py Now you just 'from sqlite_utils import Database' 2018-07-30 20:30:23 -07:00
cli.py 'sqlite-utils add-column name type' command, closes #15 2019-02-24 12:04:33 -08:00
db.py table.add_foreign_key(column, other_table, other_column) 2019-02-24 13:10:51 -08:00