Fix db migration for the transfers table and for transfers of other asset than BTS, so that its propper bts_value can be fetched later.
This commit is contained in:
parent
e4dce3cad4
commit
d36de0b30a
1 changed files with 1 additions and 0 deletions
|
@ -70,6 +70,7 @@ abstract class BitsyDatabase : RoomDatabase() {
|
|||
|
||||
database.execSQL("ALTER TABLE transfers ADD bts_value INTEGER")
|
||||
database.execSQL("UPDATE transfers SET bts_value = transfer_amount WHERE transfer_asset_id = '1.3.0'")
|
||||
database.execSQL("UPDATE transfers SET bts_value = -1 WHERE transfer_asset_id != '1.3.0'")
|
||||
|
||||
database.execSQL("DROP TABLE assets")
|
||||
database.execSQL("CREATE TABLE IF NOT EXISTS assets (`id` TEXT NOT NULL, `symbol` TEXT NOT NULL, `precision` INTEGER NOT NULL, `description` TEXT NOT NULL, `issuer` TEXT NOT NULL, PRIMARY KEY(`id`))")
|
||||
|
|
Loading…
Reference in a new issue