Repository navigation
feat(core): store models, change journal and store generation - #4560
Merged
Merged
Conversation
datlechin
enabled auto-merge (squash)
November 25, 2026 18:09
# Conflicts: # windows/src/TablePro.Interop/Generated/tablepro_ffi.cs
datlechin
disabled auto-merge
November 25, 2026 18:43
# Conflicts: # Cargo.lock # core/ARCHITECTURE.md # core/crates/storage/src/connections/cloud.rs # core/crates/storage/src/connections/mod.rs
datlechin
enabled auto-merge (squash)
November 25, 2026 19:05
datlechin
disabled auto-merge
November 25, 2026 19:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SavedConnectiongainsdetails(startup SQL, AI rules and allowed tools, SSH profile id and route, credential profile link,credential_reference, Redis database, pluginadditional_fields) anddevice(Local only, sample, origin, password file or command, Cloudflare, Cloud SQL proxy, SOCKS and tunnel command settings), flat in the entry. Additive, soconnections.jsonstays version 1.tls, is held: left out of the list and written back unchanged. An import, a form save or a profile save never takes its id, a delete or a pulled deletion removes it, and a pull keeps its favourite. The rest of the file stays usable.ConnectionList::unreadableandunreadable_profilesname them.field_trustports the macOSConnectionFieldTrusttable and the MongoDB secret options.check-connection-field-trust.pyfails when the Swift and Rust tables differ.SavedConnection::portable: no device-only setting, no unknown key, nothing that runs, sends or signs in without the import showing it, portable plugin fields only. Import takes the same projection and keeps an updated entry's own fields. The Linux connection form keeps the fields it does not show.connections.json; table folders and their items inhistory.db(new migration, no foreign keys, millisecond times);TeamLibraryStore, one file per (origin, account) atstate/team-library/<digest>.json, refusing a file bound to another owner.StoreIdentity(generation, sequence) in each store. JSON stores stamp it on every write;history.dbkeeps one row that triggers raise on every write to a synced table.compared_withsays whether a store continues, is another generation or went back.start_new_generationis for a host's restore path.ChangeJournalgets theRecordKinds each write changed, after the write and outside the store's locks.ConnectionStore,QueryHistory(every handle it gives out) andTeamLibraryStoretake one withset_journal. Deleting a connection's data takes its table folders too and names every kind it removed. Deleting a table folder or unfiling a table trims the upgrade copies.ConnectionLibraryreads and sets connection details and device settings, and saves, lists and deletes SSH and credential profiles;QueryHistoryStore::table_foldersgives aTableFolderStore. A form save keeps details and device settings. Windows bindings regenerated.unknown_auth_mode_is_held_not_dropped,an_entry_without_a_level_a_policy_or_an_access_level_is_held_not_guessed,an_entry_without_tls_is_held_not_guessed.fresh_database_applies_every_migrationandmigrator_embeds_every_migrationcount 5 migrations.linux/docs/storage.md,core/ARCHITECTURE.md.Test plan
cargo test -p tablepro-storage: every field round-trips, unknown keys survive a rewrite, held entries, an import or save never takes a held id, the export and import projection, a journal call from everyConnectionStore,QueryHistory, saved query, favourite, table folder and Team Library write, a new generation on a restore and a copied-in file, the sequence going back on an older file, the triggers on every synced table, Team Library isolation per (origin, account), the migration fixture.cargo test -p tablepro-ffi --test library_details --test library --test cloud_library --test saved_queries --test library_copies --test history.python3 -m unittest apple/scripts/ci/test_check_connection_field_trust.py.verify.sh --platform linux test tablepro-storage(400 passed),test tablepro connect_dialog(126 passed, with the test that a form save keeps details, device settings and unknown keys),lint.verify.sh --platform windows bindings(no diff after the regeneration),build,test Interop.Tests ConnectionLibrary(12 passed).history.dbupgrade copy tests (14 of them on main) fail on this Mac's system SQLite 3.54 (macOS 27):VACUUM INTOrefuses the empty.partialfile the copy pre-creates. They pass on Linux.