Commit graph

17 commits

Author SHA1 Message Date
Claude
a3f8b440e6
Rebuild internal catalog for a database in a single atomic write task
populate_schema_tables() previously ran six separate transactions per
database: one task deleting that database's catalog rows followed by
five execute_write_many inserts. Readers of the internal database could
observe the intermediate state where a database had no catalog rows.

Schema details are still collected on a read connection of the target
database first; the delete-and-reinsert now happens inside one
execute_write_fn task so the rebuild is atomic.

Refs #2831

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N76afGMhBRQk528VF1LTpR
2026-07-09 05:59:20 +00:00
Simon Willison
db7ba1d30c Switch to sqlite-utils migrations for internal.db, closes #2827 2026-07-07 13:58:48 -07:00
Simon Willison
b6f5fd5cd0 test_internal_foreign_key_references() fix for sqlite-utils 4.0rc3
Refs https://github.com/simonw/sqlite-utils/issues/769#issuecomment-4889529980
2026-07-05 23:04:51 -07:00
Simon Willison
fae847ac10 Prototype of new /-/jump menu plus plugin hook 2026-05-21 15:02:17 -07:00
Simon Willison
54b272baf6 Remove existing stale catalog_ tables, refs #2723
Now if there are any existing stale records in internal.db
those will be removed as well.
2026-05-20 12:39:54 -07:00
Simon Willison
7a914f8c65 Clear stale tables/other resources when DB removed, closes #2723 2026-05-20 12:16:23 -07:00
Simon Willison
c6c2a238c3 Fix for stale internal database bug, closes #2605 2025-12-02 16:22:42 -08:00
Simon Willison
7a602140df catalog_views table, closes #2495
Refs https://github.com/datasette/datasette-queries/issues/1#issuecomment-3074491003
2025-07-15 10:22:56 -07:00
Simon Willison
e59fd01757 Fix for incorrect REFERENCES in internal DB
Refs #2466
2025-02-12 19:40:43 -08:00
Simon Willison
bb12229794 Rename core_ to catalog_, closes #2163 2023-08-29 10:01:28 -07:00
Alex Garcia
92b8bf38c0
Add new --internal internal.db option, deprecate legacy _internal database
Refs:
- #2157 
---------

Co-authored-by: Simon Willison <swillison@gmail.com>
2023-08-28 20:24:23 -07:00
Simon Willison
8aa9cf629c Store null instead of 'None' in _internal database table, closes #1970 2022-12-31 10:52:37 -08:00
Simon Willison
9c43b4164d Removed @pytest.mark.ds_client mark - refs #1959
I don't need it - can run 'pytest -k ds_client' instead.

See https://github.com/simonw/datasette/pull/1960#issuecomment-1355685828
2022-12-17 13:47:55 -08:00
Simon Willison
e70974a4f1 Ran Black, refs #1959 2022-12-17 13:47:55 -08:00
Simon Willison
ef74d0ff70 ds_client for test_internal_db.py, refs #1959 2022-12-17 13:47:55 -08:00
Simon Willison
bc1f1e1ce8 Compound primary key for foreign_keys table in _internal 2020-12-22 11:04:29 -08:00
Simon Willison
dcdfb2c301 Rename _schemas to _internal, closes #1156 2020-12-21 11:48:06 -08:00
Renamed from tests/test_schemas.py (Browse further)