Unify create and alter table modal controls

Share default value controls between the create and alter table dialogs and expose create-table default expressions to the frontend.

Add create-table not-null/default handling and align the shared foreign key picker behavior across both dialogs.
This commit is contained in:
Simon Willison 2026-06-22 12:50:57 -07:00
commit fa43aba309
5 changed files with 707 additions and 170 deletions

View file

@ -997,6 +997,11 @@ async def test_database_create_table_action_button_and_data():
"foreignKeyTargetsPath": "/data/-/foreign-key-targets",
"databaseName": "data",
"columnTypes": ["text", "integer", "float", "blob"],
"defaultExpressions": [
"current_timestamp",
"current_date",
"current_time",
],
},
}
assert "customColumnTypes" not in database_data_from_soup(soup)["createTable"]