sqlite-utils transform --add-foreign-key option, closes #585

This commit is contained in:
Simon Willison 2023-08-17 18:51:04 -07:00
commit 56093de078
4 changed files with 83 additions and 30 deletions

View file

@ -2061,6 +2061,9 @@ Every option for this table (with the exception of ``--pk-none``) can be specifi
``--drop-foreign-key column``
Drop the specified foreign key.
``--add-foregn-key column other_table other_column``
Add a foreign key constraint to ``column`` pointing to ``other_table.other_column``.
If you want to see the SQL that will be executed to make the change without actually executing it, add the ``--sql`` flag. For example:
.. code-block:: bash