From 78bfe643a88ac9e8be4ea7a5f402c629d4181c39 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 20 May 2025 15:37:19 +0200 Subject: [PATCH] chore: bump config version, prevent accidental downgrade --- lib/config/config.go | 2 +- lib/config/migrations.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config/config.go b/lib/config/config.go index 73c48ecd0..2f6db9a35 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -31,7 +31,7 @@ import ( const ( OldestHandledVersion = 10 - CurrentVersion = 37 + CurrentVersion = 50 MaxRescanIntervalS = 365 * 24 * 60 * 60 ) diff --git a/lib/config/migrations.go b/lib/config/migrations.go index 014d31404..a2e3a24b8 100644 --- a/lib/config/migrations.go +++ b/lib/config/migrations.go @@ -27,6 +27,7 @@ import ( // put the newest on top for readability. var ( migrations = migrationSet{ + {50, migrateToConfigV50}, {37, migrateToConfigV37}, {36, migrateToConfigV36}, {35, migrateToConfigV35}, @@ -96,6 +97,10 @@ func (m migration) apply(cfg *Configuration) { cfg.Version = m.targetVersion } +func migrateToConfigV50(cfg *Configuration) { + // v50 is Syncthing 2.0 +} + func migrateToConfigV37(cfg *Configuration) { // "scan ownership" changed name to "send ownership" for i := range cfg.Folders {