65be341f
db: read a database's timestamps out of the store
The repository table has carried created and updated since the first migration and the projection never selected them, so core.Repo could not answer when a database was made. Nothing needed it while the surfaces were pages: a listing sorts by created in SQL and prints none of it. /query publishes a database as a record rather than as a page, and a record without its timestamps is a poorer answer for no reason — the columns are already there. CreateRepo returns the pair it wrote, so a caller need not re-read the row to learn them. The test reads them back through all three projections. A column dropped from repoSelect would otherwise surface as the zero time for every database on the instance, without failing anywhere.
Eugene Blikh <bigbes@gmail.com> — 2026-08-15 10:16:44 UTC
Commit 65be341fc575daaf7f1093b698b40193bf75ab93 —
view raw patch
Parent(s):
cd0b0c0f
| File | Status | + | − |
|---|---|---|---|
core/models.go
|
M | +8 | |
db/repos.go
|
M | +3 | -2 |
db/repos_test.go
|
M | +47 |