Commit a25d7471 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Only drop the indices if they exist

parent 7b342a20
......@@ -60,8 +60,8 @@ private val MIGRATION_5_6 = migration(5, 6) {
private val MIGRATION_6_7 = migration(6,7) {
Logger.logIfOpen("DB_MIGRATION", "Migrating from 6 to 7")
it.execSQL("DROP INDEX `index_DnsRule_host`")
it.execSQL("DROP INDEX `index_DnsRule_host_type`")
it.execSQL("DROP INDEX IF EXISTS `index_DnsRule_host`")
it.execSQL("DROP INDEX IF EXISTS `index_DnsRule_host_type`")
it.execSQL("CREATE UNIQUE INDEX `index_DnsRule_host_type_stagingType` ON `DnsRule` (`host`, `type`, `stagingType`)")
Logger.logIfOpen("DB_MIGRATION", "Migration from 6 to 7 completed")
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment