Fix database migration

This commit is contained in:
MM20 2023-02-15 22:08:52 +01:00
parent 10fa8aac7e
commit 47fa1cbbed
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -16,8 +16,8 @@ class Migration_19_20: Migration(19, 20) {
`themed` INTEGER NOT NULL DEFAULT 0,
`id` INTEGER PRIMARY KEY AUTOINCREMENT)
""")
database.execSQL("INSERT INTO `Icons` (`type`, `componentName`, `drawable`, `iconPack`, `themed`, `name`) SELECT `type`, `componentName`, `drawable`, `iconPack`, null FROM `Icons_old`")
database.execSQL("INSERT INTO `Icons` (`type`, `componentName`, `drawable`, `iconPack`, `themed`, `name`) SELECT `type`, `componentName`, `drawable`, `iconPack`, 0, null FROM `Icons_old`")
database.execSQL("DROP TABLE `Icons_old`")
database.execSQL("ALTER TABLE `IconPacks` ADD COLUMN `themed` INTEGER NOT NULL DEFAULT 0")
database.execSQL("ALTER TABLE `IconPack` ADD COLUMN `themed` INTEGER NOT NULL DEFAULT 0")
}
}