Skip to content

fix(server): an app on tables of its own starts its sample afresh - #98

Merged
MoSofi merged 1 commit into
mainfrom
fix/app-reinstall-sample-ledger
Oct 11, 2026
Merged

MoSofi merged 1 commit into
mainfrom
fix/app-reinstall-sample-ledger

Conversation

@MoSofi

@MoSofi MoSofi commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

An app installed again on tables of its own starts its sample afresh.

The case. An app is removed and installed again, and the new install reuses none of the earlier tables: they were dropped with it, or they were an older version's under plain names. The earlier install's list of sample rows was still counted with the new one, which doubled the count shown.

The change.

  • At install, a kept sample list is marked dropped when the install reuses no table. Where tables are reused, the list is taken back as before (already on main).
  • When the sample is next added and a dropped list's table is still there, that table is emptied first. It is the app's own bookkeeping table (<app>_sample_data: which rows are sample), never one of its data tables. Rows an earlier version left behind stay as ordinary rows.

Tests. Folded into app-sample-reinstall.test.ts: the released Point of Sale app on every engine the run can reach: still the sample over kept tables; afresh on tables of its own; afresh after its tables were dropped.

History. Written on 2026-10-08 and never merged. Rebuilt as one commit on today's main: the commit main already had was left out, one conflict in install-service.ts resolved by keeping main's check that the list's table exists, the changeset cut to what is new.

@MoSofi
MoSofi force-pushed the fix/app-reinstall-sample-ledger branch from df37825 to d33ce68 Compare October 11, 2026 13:11
@MoSofi
MoSofi merged commit aa31f0a into main Oct 11, 2026
15 checks passed
@MoSofi
MoSofi deleted the fix/app-reinstall-sample-ledger branch October 11, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant