From 98cd11a81ba553a8b4b5e7b88c447867256318a7 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 18 Aug 2023 10:45:12 -0700 Subject: [PATCH] Link docs to sqlite-utils-fast-fks --- docs/python-api.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/python-api.rst b/docs/python-api.rst index 2dd79fe..de44f90 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -1283,6 +1283,8 @@ The SQLite ``ALTER TABLE`` statement doesn't have the ability to add foreign key The ``add_foreign_key()`` method here is a convenient wrapper around :ref:`table.transform() `. +It's also possible to add foreign keys by directly updating the `sqlite_master` table. The `sqlite-utils-fast-fks `__ plugin implements this pattern, using code that was included with ``sqlite-utils`` prior to version 3.35. + Here's an example of this mechanism in action: .. code-block:: python