If the database was already at the current version, bss-init would fail (despite manipulating any data) because the default migration version, if not passed, was 0. It would then try to downgrade to version 0, for which there is no migration. This PR changes the default to be the value of SCHEMA_STEPS, which corresponds to the number of migration steps.
Short Description
If the database was already at the current version,
bss-init
would fail (despite manipulating any data) because the default migration version, if not passed, was 0. It would then try to downgrade to version 0, for which there is no migration. This PR changes the default to be the value ofSCHEMA_STEPS
, which corresponds to the number of migration steps.Changes
cmd/bss-init/main.go
:migrationVersion uint
->migrationVersion = uint(SCHEMA_STEPS)
.version
fileCHANGELOG.md