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
This commit is contained in:
@@ -25,11 +25,8 @@ const defaultDatabasePath = "/var/lib/sfdupes/db.sqlite"
|
||||
const databaseEnv = "SFDUPES_DATABASE"
|
||||
|
||||
// schemaVersion is the database schema version this build reads and
|
||||
// writes, stored in PRAGMA user_version. Version 2 adds the content
|
||||
// column and the head/tail/content signature (replacing the version 1
|
||||
// 1 KiB end windows), so a version 1 database is rejected and must be
|
||||
// rescanned.
|
||||
const schemaVersion = 2
|
||||
// writes, stored in PRAGMA user_version.
|
||||
const schemaVersion = 1
|
||||
|
||||
// dbDirPerm is the mode for a database parent directory created by
|
||||
// scan.
|
||||
|
||||
Reference in New Issue
Block a user