mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Compound primary key support for /db/-/create - closes #1911
Needed for tests in #1864
This commit is contained in:
parent
484bef0d3b
commit
1154048f79
3 changed files with 69 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue