Refuse an unversioned database that already has a files table (closes #11)
check / check (push) Failing after 2s

A database at user_version 0 that already has a files table was not
created by sfdupes: a foreign or partially initialized file. scan used
to run its CREATE TABLE on it and fail with a raw SQLite error, and
report and trees gave only a bare version mismatch. All three now
check for a files table at version 0 and refuse such a database with
the schema-version error telling the operator to remove the file and
rescan. A genuinely empty database is unchanged: scan creates the
schema, report and trees refuse it as before.

Model: opus-4-8 (implementation); opus-5-5 (rebase)
This commit is contained in:
2026-10-04 08:02:43 +00:00
parent 2eeba3df6f
commit f2e71e4f41
4 changed files with 81 additions and 1 deletions
+4
View File
@@ -29,6 +29,10 @@
# Completed Steps
- refuse an unversioned database that already has a `files` table with
a clear schema-version error (2026-10-04,
https://git.eeqj.de/sneak/sfdupes/issues/11)
- the `Dockerfile` build stage keeps the Go module cache out of `builder`'s
home and copies the sources with `--chown`, so no `chown -R` walks them
(2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/43)