Rename set-column-types action to et-column-type

Refs https://github.com/simonw/datasette/pull/2674#issuecomment-4085015792
This commit is contained in:
Simon Willison 2026-03-18 12:18:48 -07:00
commit 2b06da29a1
7 changed files with 18 additions and 20 deletions

View file

@ -33,7 +33,7 @@ The one exception is the "root" account, which you can sign into while using Dat
The ``--root`` flag is designed for local development and testing. When you start Datasette with ``--root``, the root user automatically receives every permission, including:
* All view permissions (``view-instance``, ``view-database``, ``view-table``, etc.)
* All write permissions (``insert-row``, ``update-row``, ``delete-row``, ``create-table``, ``alter-table``, ``set-column-types``, ``drop-table``)
* All write permissions (``insert-row``, ``update-row``, ``delete-row``, ``create-table``, ``alter-table``, ``set-column-type``, ``drop-table``)
* Debug permissions (``permissions-debug``, ``debug-menu``)
* Any custom permissions defined by plugins
@ -886,7 +886,7 @@ To grant ``create-table`` to the user with ``id`` of ``editor`` for the ``docs``
}
.. [[[end]]]
Other table-scoped write permissions, including ``set-column-types``, can be configured in the same place.
Other table-scoped write permissions, including ``set-column-type``, can be configured in the same place.
And for ``insert-row`` against the ``reports`` table in that ``docs`` database:
@ -1212,9 +1212,7 @@ To include an expiry pass ``expire_after=`` to ``datasette.set_actor_cookie()``
.. code-block:: python
response = Response.redirect("/")
datasette.set_actor_cookie(
response, {"id": "cleopaws"}, expire_after=60 * 60 * 24
)
datasette.set_actor_cookie(response, {"id": "cleopaws"}, expire_after=60 * 60 * 24)
The resulting cookie will encode data that looks something like this:
@ -1350,10 +1348,10 @@ Actor is allowed to alter a database table.
``table`` is the name of the table (string)
.. _actions_set_column_types:
.. _actions_set_column_type:
set-column-types
----------------
set-column-type
---------------
Actor is allowed to set assigned column types for columns in a table.

View file

@ -946,7 +946,7 @@ Pass ``"alter": true`` to automatically add any missing columns to the existing
Setting a column type
~~~~~~~~~~~~~~~~~~~~~
To set a column type for a table column, make a ``POST`` to ``/<database>/<table>/-/set-column-type``. This requires the :ref:`actions_set_column_types` permission.
To set a column type for a table column, make a ``POST`` to ``/<database>/<table>/-/set-column-type``. This requires the :ref:`actions_set_column_type` permission.
::