• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

datatug / datatug-cli / 26886208568
62%

Build:
DEFAULT BRANCH: main
Ran 03 Jun 2026 12:57PM UTC
Jobs 1
Files 275
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jun 2026 12:56PM UTC coverage: 38.454% (-0.2%) from 38.649%
26886208568

push

github

web-flow
feat(filestore): persist DB models on save + make collection keys serializable (#140)

`SaveProject` previously logged "Saving N DB models IS NOT IMPLEMENTED YET"
and dropped the scanned schema. It now persists DB models via the existing
fsDbModelsStore, so `datatug scan` writes the tables/columns to disk
(e.g. dbmodels/<id>.dbmodel.json).

Wiring that revealed a deeper bug: DBCollectionKey kept its identity in
UNEXPORTED fields (schema/catalog/type) plus a dal.CollectionRef with no
exported fields, so a table/view serialized to `{"Ref":{}}` — losing its
name on round-trip. Fix: expose the identity as json-tagged fields
(Name/Schema/Catalog/Type), with Ref kept in-memory only (json:"-").

The field rename was done with `gopls rename` (type-aware) for the
method->temp step, then a safe grep for the unique temp -> field access,
so the ~190 call sites changed deterministically. Methods Name()/Schema()/
Catalog()/Type() are gone in favour of the fields.

Also: loadTable now applies the path-derived identity AFTER reading the
file body, so the directory-tree format (name in path) still wins and old
files without a body name keep loading.

Verified end-to-end: scanning the chinook SQLite fixture writes a dbmodel
with 11 named tables, their column lists, types and PKs. Added a
SaveProject round-trip test (table + column survive save/load). Full
module build, vet, and test suite pass.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

51 of 69 new or added lines in 14 files covered. (73.91%)

31 existing lines in 2 files now uncovered.

5497 of 14295 relevant lines covered (38.45%)

0.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
1.19
0.0% pkg/schemers/sqlinfoschema/schemer.go
5
82.09
3.46% pkg/datatug-core/storage/filestore/store_project_saver.go
3
8.33
0.0% apps/datatugapp/commands/cmd_show_project.go
3
0.0
0.0% apps/datatugapp/datatugui/dtviewers/dbviewer/tables_box.go
1
89.29
0.0% pkg/datatug-core/schemer/scan_constraints.go

Coverage Regressions

Lines Coverage ∆ File
30
47.09
-17.44% pkg/dtlog/posthog.go
1
0.0
0.0% apps/datatugapp/datatugui/dtviewers/dbviewer/tables_box.go
Jobs
ID Job ID Ran Files Coverage
1 26886208568.1 03 Jun 2026 12:57PM UTC 275
38.45
GitHub Action Run
Source Files on build 26886208568
  • Tree
  • List 275
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 21ddde40 on github
  • Prev Build on main (#26884722401)
  • Next Build on main (#26886975278)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc