chore: bump config version, prevent accidental downgrade
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
OldestHandledVersion = 10
|
OldestHandledVersion = 10
|
||||||
CurrentVersion = 37
|
CurrentVersion = 50
|
||||||
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import (
|
|||||||
// put the newest on top for readability.
|
// put the newest on top for readability.
|
||||||
var (
|
var (
|
||||||
migrations = migrationSet{
|
migrations = migrationSet{
|
||||||
|
{50, migrateToConfigV50},
|
||||||
{37, migrateToConfigV37},
|
{37, migrateToConfigV37},
|
||||||
{36, migrateToConfigV36},
|
{36, migrateToConfigV36},
|
||||||
{35, migrateToConfigV35},
|
{35, migrateToConfigV35},
|
||||||
@@ -96,6 +97,10 @@ func (m migration) apply(cfg *Configuration) {
|
|||||||
cfg.Version = m.targetVersion
|
cfg.Version = m.targetVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func migrateToConfigV50(cfg *Configuration) {
|
||||||
|
// v50 is Syncthing 2.0
|
||||||
|
}
|
||||||
|
|
||||||
func migrateToConfigV37(cfg *Configuration) {
|
func migrateToConfigV37(cfg *Configuration) {
|
||||||
// "scan ownership" changed name to "send ownership"
|
// "scan ownership" changed name to "send ownership"
|
||||||
for i := range cfg.Folders {
|
for i := range cfg.Folders {
|
||||||
|
|||||||
Reference in New Issue
Block a user