From b6cddedbd4e0d16bed3253bd4c9586822e9ea6c8 Mon Sep 17 00:00:00 2001 From: Javier Varona Date: Tue, 13 Nov 2018 22:46:50 -0400 Subject: [PATCH] - Fixed tables creation --- .../java/cy/agorise/crystalwallet/dao/CrystalDatabase.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java index 8ee1f5d..1b224ec 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java @@ -118,6 +118,9 @@ public abstract class CrystalDatabase extends RoomDatabase { +"io_index INTEGER NOT NULL," +"address TEXT," +"is_output INTEGER NOT NULL," + +"amount INTEGER NOT NULL," + +"script_hex TEXT," + +"original_txid TEXT," +"PRIMARY KEY (bitcoin_transaction_id, io_index, is_output)," +"FOREIGN KEY (bitcoin_transaction_id) REFERENCES bitcoin_transaction(crypto_coin_transaction_id) ON DELETE CASCADE)"); } @@ -131,7 +134,7 @@ public abstract class CrystalDatabase extends RoomDatabase { +"address_index INTEGER NOT NULL," +"is_change INTEGER NOT NULL," +"address TEXT NOT NULL," - +"PRIMARY KEY (account_id, address_index)," + +"PRIMARY KEY (account_id, address_index, is_change)," +"FOREIGN KEY (account_id) REFERENCES crypto_net_account(id) ON DELETE CASCADE)"); } };