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

datatug / datatug-cli / 26886975278
62%

Build:
DEFAULT BRANCH: main
Ran 03 Jun 2026 01:11PM 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 01:10PM UTC coverage: 38.231% (-0.2%) from 38.454%
26886975278

push

github

web-flow
feat(sqlite): extract indexes, foreign keys and constraints (and persist them) (#141)

The sqlite schemer previously returned empty for indexes/index-columns/
constraints (they were fake MS-SQL/INFORMATION_SCHEMA stubs). Implement them
natively via PRAGMA:

- GetIndexes        -> PRAGMA index_list  (name, unique, origin, partial)
- GetIndexColumns   -> PRAGMA index_info
- GetConstraints    -> PRAGMA foreign_key_list (FOREIGN KEY) + unique-origin
                       indexes (UNIQUE). Primary keys come from column metadata,
                       so they are not re-emitted here.

The providers now live on schemaProvider (so they share the DB getter), and
the empty stub structs are removed.

To make the extracted relationships reach disk, TableModel gained PrimaryKey,
ForeignKeys, ReferencedBy, Indexes and AlternateKeys fields, and
updateSchemaModel now copies them from the scanned catalog (previously only
columns were carried into the persisted DB model).

Verified end-to-end: scanning chinook now writes, per table, the foreign keys
(e.g. Album.ArtistId -> Artist), indexes with their columns, primary key, and
reverse references. Tests: a scanDbCatalog extraction test (FK + index +
unique + referenced-by) and an extended SaveProject round-trip (PK/FK/index
survive save+load). Full module build, vet and test suite pass.

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

0 of 174 new or added lines in 4 files covered. (0.0%)

5527 of 14457 relevant lines covered (38.23%)

0.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
96
0.0
0.0% pkg/schemers/sqliteschema/constraints.go
40
0.0
0.0% pkg/schemers/sqliteschema/indexes.go
33
0.0
0.0% pkg/schemers/sqliteschema/index_columns.go
5
5.46
-0.09% pkg/api/scan_db_schema_api.go
Jobs
ID Job ID Ran Files Coverage
1 26886975278.1 03 Jun 2026 01:11PM UTC 275
38.23
GitHub Action Run
Source Files on build 26886975278
  • Tree
  • List 275
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 92a4140b on github
  • Prev Build on main (#26886208568)
  • Next Build on main (#26961145970)
  • 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