Compound primary key support for /db/-/create - closes #1911

Needed for tests in #1864
This commit is contained in:
Simon Willison 2022-11-29 10:47:46 -08:00
commit 1154048f79
3 changed files with 69 additions and 3 deletions

View file

@ -666,6 +666,8 @@ The JSON here describes the table that will be created:
If you set this to ``id`` without including an ``id`` column in the list of ``columns``, Datasette will create an integer ID column for you.
* ``pks`` can be used instead of ``pk`` to create a compound primary key. It should be a JSON list of column names to use in that primary key.
If the table is successfully created this will return a ``201`` status code and the following response:
.. code-block:: json