Keep the database schema at version 1 (closes #61) #63

Merged
clawbot merged 1 commits from issue-61-schema-version-1 into next 2026-09-23 13:38:07 +02:00
Collaborator

Keeps the database schema at version 1, as the owner asked when reopening #61: the project is pre-1.0, with no installed base and no databases anywhere.

  • db.go: schemaVersion is 1 again. The six-column files table, content included, the upsert and the row loading are unchanged; they are simply the version 1 schema. The comment on the constant only says what it is.
  • The check that stops on a database whose version is neither 0 (fresh) nor schemaVersion, errSchemaVersion, and its test that sets version 99 stay: they predate #62. Tests read the version from schemaVersion.
  • README.md: the schema bullet says the version is currently 1 and that any other version is a fatal error. The text about version 2 and about rejecting and rescanning version 1 databases is gone. The CREATE TABLE block and the column descriptions match the code and are unchanged.
  • TODO.md: the Completed Steps entry for the issue is corrected in place and says the content column is part of the version 1 schema.
  • Nothing is kept for old data: no migration, upgrade or compatibility step.

Judgement call: the main.go package comment still described 1024-byte end windows and said full file contents are never read, both wrong since #62. It now describes the hashes the code computes, in the README's terms.

Model: opus-5-5

Keeps the database schema at version 1, as the owner asked when reopening https://git.eeqj.de/sneak/sfdupes/issues/61: the project is pre-1.0, with no installed base and no databases anywhere. - `db.go`: `schemaVersion` is 1 again. The six-column `files` table, `content` included, the upsert and the row loading are unchanged; they are simply the version 1 schema. The comment on the constant only says what it is. - The check that stops on a database whose version is neither 0 (fresh) nor `schemaVersion`, `errSchemaVersion`, and its test that sets version 99 stay: they predate https://git.eeqj.de/sneak/sfdupes/pulls/62. Tests read the version from `schemaVersion`. - `README.md`: the schema bullet says the version is currently 1 and that any other version is a fatal error. The text about version 2 and about rejecting and rescanning version 1 databases is gone. The `CREATE TABLE` block and the column descriptions match the code and are unchanged. - `TODO.md`: the Completed Steps entry for the issue is corrected in place and says the `content` column is part of the version 1 schema. - Nothing is kept for old data: no migration, upgrade or compatibility step. Judgement call: the `main.go` package comment still described 1024-byte end windows and said full file contents are never read, both wrong since https://git.eeqj.de/sneak/sfdupes/pulls/62. It now describes the hashes the code computes, in the README's terms. Model: opus-5-5
clawbot added the needs-review label 2026-09-23 13:18:19 +02:00
clawbot self-assigned this 2026-09-23 13:18:19 +02:00
clawbot added 1 commit 2026-09-23 13:18:19 +02:00
Keep the database schema at version 1 (closes #61)
check / check (push) Successful in 55s
37cf53e71f
sfdupes is pre-1.0, with no installed base and no databases anywhere,
so the schema is changed in place and its version stays 1.
schemaVersion goes back to 1; the six-column files table, content
included, is the version 1 schema. The check that stops on a database
with any other version stays. README.md and TODO.md no longer describe
a version 2 or rejecting and rescanning version 1 databases. The
main.go package comment still described 1024-byte end windows and said
full file contents are never read; it now describes the hashes the
code computes.

Model: opus-5-5
Author
Collaborator

Independent review: PASS.

Model: opus-5-5

Independent review: PASS. Model: opus-5-5
clawbot merged commit 09a39ddf37 into next 2026-09-23 13:38:07 +02:00
clawbot deleted branch issue-61-schema-version-1 2026-09-23 13:38:07 +02:00
clawbot removed the needs-review label 2026-09-23 13:38:33 +02:00
Sign in to join this conversation.