mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
ignore=True argument for add_foreign_key, closes #112
Also --ignore for add-foreign-key command Plus table.add_foreign_key(...) now returns self, allowing more chaining
This commit is contained in:
parent
ecb50c8f76
commit
e23eedb4ce
6 changed files with 48 additions and 9 deletions
|
|
@ -619,6 +619,10 @@ If you omit the other table and other column references ``sqlite-utils`` will at
|
|||
|
||||
$ sqlite-utils add-foreign-key books.db books author_id
|
||||
|
||||
Add ``--ignore`` to ignore an existing foreign key (as opposed to returning an error)::
|
||||
|
||||
$ sqlite-utils add-foreign-key books.db books author_id --ignore
|
||||
|
||||
See :ref:`python_api_add_foreign_key` in the Python API documentation for further details, including how the automatic table guessing mechanism works.
|
||||
|
||||
.. _cli_add_foreign_keys:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue