Skip to content

Commit

Permalink
refactor(config): fix migration maps names
Browse files Browse the repository at this point in the history
  • Loading branch information
rvbsm committed Oct 22, 2024
1 parent ccae3fd commit 18357f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/dev/rvbsm/fsit/config/ConfigMigrations.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ private val legacyMigrations by lazy {
)
}

private val v0Migrations by lazy {
private val v1Migrations by lazy {
mapOf(
"version=1" to "version!",
)
}

private val v1Migrations by lazy {
private val v2Migrations by lazy {
mapOf(
"version=2" to "version!",

Expand All @@ -67,8 +67,8 @@ private fun getMigrations(version: Int = 0) = buildMap {
if (version <= ANCIENT_VERSION) putAll(ancientMigrations)
if (version <= LEGACY_VERSION) putAll(legacyMigrations)

if (version < 1) putAll(v0Migrations)
if (version < 2) putAll(v1Migrations)
if (version < 1) putAll(v1Migrations)
if (version < 2) putAll(v2Migrations)
}

private val JsonObject.version get() =
Expand Down

0 comments on commit 18357f0

Please sign in to comment.