Review comments

This commit is contained in:
Syer10
2026-05-12 09:32:09 -04:00
parent fe6dd05411
commit 3bc75d5b00
2 changed files with 9 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ private fun migrateMangaDownloadDir(applicationDirs: ApplicationDirs) {
}
}
fun migrateDatabaseToV24240(applicationDirs: ApplicationDirs) {
fun migrateH2DatabaseToV24240(applicationDirs: ApplicationDirs) {
H2Migration.migrate(
applicationDirs.dataRoot,
"1.4.200",
@@ -92,8 +92,8 @@ private val MIGRATIONS =
"FixGlobalUpdateScheduling" to {
Injekt.get<IUpdater>().deleteLastAutomatedUpdateTimestamp()
},
"MigrateDatabaseToV2.4.240" to { applicationDirs ->
migrateDatabaseToV24240(applicationDirs)
"MigrateH2DatabaseToV2.4.240" to { applicationDirs ->
migrateH2DatabaseToV24240(applicationDirs)
},
)

View File

@@ -77,6 +77,8 @@ object H2Migration {
libsDir = libsDir,
mvStore = mvStore,
script = script,
h2Old = h2Old,
h2New = h2New,
)
// Move database to proper path
@@ -121,6 +123,8 @@ object H2Migration {
libsDir: Path,
mvStore: Path,
script: Path,
h2Old: String,
h2New: String,
) {
URLClassLoader(
arrayOf(migrationJar.toUri().toURL()),
@@ -140,10 +144,10 @@ object H2Migration {
libsDir.absolutePathString(),
// from version
"-f",
"1.4.200",
h2Old,
// to version
"-t",
"2.4.240",
h2New,
// user
"-u",
"",