sections: changelog:id2
This data as json
| id | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| changelog:id2 | changelog | id2 | Unreleased | New "Create table" interface in the database actions menu, backed by the /<database>/-/create JSON API . It can define columns, primary keys, custom column types, NOT NULL constraints, literal defaults, expression defaults and single-column foreign keys. ( #2787 ) New "Alter table" table action and /<database>/<table>/-/alter JSON API for changing existing tables: add, rename, reorder and drop columns; change column types, defaults, NOT NULL constraints, primary keys and foreign keys; and rename the table. The alter table dialog also includes a "Drop table" button. ( #2788 ) New /<database>/-/foreign-key-targets and /<database>/<table>/-/foreign-key-suggestions JSON APIs for discovering valid single-column foreign key targets and suggested relationships. Create and alter table dialogs share their column-editing controls, including literal and expression defaults, custom column types, foreign keys and column ordering. The "Write to this database" page now includes a Create table starter template, alongside the existing Insert, Update and Delete templates. ( #2794 ) New Template context documentation listing the variables available to custom templates for Datasette's core pages. Variables documented there are treated as a stable API for custom templates until Datasette 2.0. The documentation is generated from dataclass definitions next to the view code, with tests that compare the documented fields against the actual contexts rendered by the database, table, query and row pages. ( #1510 , #2127 , #1477 , #2803 ) New static() template function and datasette.static() method for generating cache-busting static asset URLs based on the file contents. Static assets served with a matching ?_hash= parameter now receive far-future immutable cache headers. This works for Datasette's bundled static assets, plugin static assets and directories mounted using --static . See Linking to static assets . Database and table pages now use the count_truncated template context value to display capped row counts as >N rows . Significant visual improvements to the table filter form UI, plus working add/remove filter buttons. ( #2798 ) Improved edit row icon on table pages. ( #2796 ) Documentation covers how actors are displayed. Thanks, Sebastian Cao . ( #2002 ) Fix for bug where appending ?_col=pk resulted in duplicate primary key columns in the response. Thanks, Ritesh Kewlani . ( #1975 ) | ["Changelog"] | [{"href": "https://github.com/simonw/datasette/issues/2787", "label": "#2787"}, {"href": "https://github.com/simonw/datasette/issues/2788", "label": "#2788"}, {"href": "https://github.com/simonw/datasette/pull/2794", "label": "#2794"}, {"href": "https://github.com/simonw/datasette/issues/1510", "label": "#1510"}, {"href": "https://github.com/simonw/datasette/issues/2127", "label": "#2127"}, {"href": "https://github.com/simonw/datasette/issues/1477", "label": "#1477"}, {"href": "https://github.com/simonw/datasette/pull/2803", "label": "#2803"}, {"href": "https://github.com/simonw/datasette/issues/2798", "label": "#2798"}, {"href": "https://github.com/simonw/datasette/issues/2796", "label": "#2796"}, {"href": "https://github.com/cycsmail", "label": "Sebastian Cao"}, {"href": "https://github.com/simonw/datasette/issues/2002", "label": "#2002"}, {"href": "https://github.com/riteshkew", "label": "Ritesh Kewlani"}, {"href": "https://github.com/simonw/datasette/issues/1975", "label": "#1975"}] |