Skip to content

Commit

Permalink
Fixed migration (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonijzelinskij authored Jul 16, 2024
1 parent 719bb83 commit c5b8566
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ val ChainNetworkManagement_59_60 = object : Migration(59, 60) {
""".trimIndent()
)

database.execSQL("CREATE INDEX IF NOT EXISTS `index_node_selection_preferences_chainId` ON `node_selection_preferences` (`chainId`)")

// Fill new table with default values
database.execSQL(
"""
INSERT INTO node_selection_preferences (chainId, autobalanceEnabled, selectedNodeUrl)
SELECT id, ${NodeSelectionPreferencesLocal.DEFAULT_AUTO_BALANCE_DEFAULT_STR}, NULL FROM chain
SELECT id, ${NodeSelectionPreferencesLocal.DEFAULT_AUTO_BALANCE_DEFAULT_STR}, NULL FROM chains
""".trimIndent()
)
}
Expand Down

0 comments on commit c5b8566

Please sign in to comment.