"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `seed_id` INTEGER NOT NULL, `account_index` INTEGER NOT NULL, `crypto_net` TEXT, `name` TEXT, FOREIGN KEY(`seed_id`) REFERENCES `account_seed`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"createSql":"CREATE UNIQUE INDEX `index_crypto_net_account_seed_id_crypto_net_account_index` ON `${TABLE_NAME}` (`seed_id`, `crypto_net`, `account_index`)"
}
],
"foreignKeys":[
{
"table":"account_seed",
"onDelete":"NO ACTION",
"onUpdate":"NO ACTION",
"columns":[
"seed_id"
],
"referencedColumns":[
"id"
]
}
]
},
{
"tableName":"crypto_coin_transaction",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER, `is_input` INTEGER NOT NULL, `account_id` INTEGER NOT NULL, `amount` INTEGER NOT NULL, `id_currency` INTEGER NOT NULL, `is_confirmed` INTEGER NOT NULL, `from` TEXT, `to` TEXT, FOREIGN KEY(`account_id`) REFERENCES `crypto_net_account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`id_currency`) REFERENCES `crypto_currency`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT, `crypto_net` TEXT, `precision` INTEGER NOT NULL)",
"fields":[
{
"fieldPath":"mId",
"columnName":"id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"mName",
"columnName":"name",
"affinity":"TEXT",
"notNull":false
},
{
"fieldPath":"mCryptoNet",
"columnName":"crypto_net",
"affinity":"TEXT",
"notNull":false
},
{
"fieldPath":"mPrecision",
"columnName":"precision",
"affinity":"INTEGER",
"notNull":true
}
],
"primaryKey":{
"columnNames":[
"id"
],
"autoGenerate":true
},
"indices":[
{
"name":"index_crypto_currency_crypto_net_name",
"unique":true,
"columnNames":[
"crypto_net",
"name"
],
"createSql":"CREATE UNIQUE INDEX `index_crypto_currency_crypto_net_name` ON `${TABLE_NAME}` (`crypto_net`, `name`)"
}
],
"foreignKeys":[]
},
{
"tableName":"crypto_coin_balance",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `account_id` INTEGER NOT NULL, `crypto_currency_id` INTEGER NOT NULL, `balance` INTEGER NOT NULL, FOREIGN KEY(`account_id`) REFERENCES `crypto_net_account`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields":[
{
"fieldPath":"mId",
"columnName":"id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"mAccountId",
"columnName":"account_id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"mCryptoCurrencyId",
"columnName":"crypto_currency_id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"mBalance",
"columnName":"balance",
"affinity":"INTEGER",
"notNull":true
}
],
"primaryKey":{
"columnNames":[
"id"
],
"autoGenerate":true
},
"indices":[
{
"name":"index_crypto_coin_balance_id",
"unique":false,
"columnNames":[
"id"
],
"createSql":"CREATE INDEX `index_crypto_coin_balance_id` ON `${TABLE_NAME}` (`id`)"
},
{
"name":"index_crypto_coin_balance_account_id",
"unique":false,
"columnNames":[
"account_id"
],
"createSql":"CREATE INDEX `index_crypto_coin_balance_account_id` ON `${TABLE_NAME}` (`account_id`)"
"createSql":"CREATE UNIQUE INDEX `index_crypto_coin_balance_account_id_crypto_currency_id` ON `${TABLE_NAME}` (`account_id`, `crypto_currency_id`)"
}
],
"foreignKeys":[
{
"table":"crypto_net_account",
"onDelete":"NO ACTION",
"onUpdate":"NO ACTION",
"columns":[
"account_id"
],
"referencedColumns":[
"id"
]
}
]
},
{
"tableName":"graphene_account",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`crypto_net_account_id` INTEGER NOT NULL, `account_name` TEXT, `account_id` TEXT, PRIMARY KEY(`crypto_net_account_id`), FOREIGN KEY(`crypto_net_account_id`) REFERENCES `crypto_net_account`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields":[
{
"fieldPath":"cryptoNetAccountId",
"columnName":"crypto_net_account_id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"name",
"columnName":"account_name",
"affinity":"TEXT",
"notNull":false
},
{
"fieldPath":"accountId",
"columnName":"account_id",
"affinity":"TEXT",
"notNull":false
}
],
"primaryKey":{
"columnNames":[
"crypto_net_account_id"
],
"autoGenerate":false
},
"indices":[],
"foreignKeys":[
{
"table":"crypto_net_account",
"onDelete":"NO ACTION",
"onUpdate":"NO ACTION",
"columns":[
"crypto_net_account_id"
],
"referencedColumns":[
"id"
]
}
]
},
{
"tableName":"bitshares_asset",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`crypto_curreny_id` INTEGER NOT NULL, `bitshares_id` TEXT, `asset_type` TEXT, PRIMARY KEY(`crypto_curreny_id`), FOREIGN KEY(`crypto_curreny_id`) REFERENCES `crypto_currency`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
"fields":[
{
"fieldPath":"cryptoCurrencyId",
"columnName":"crypto_curreny_id",
"affinity":"INTEGER",
"notNull":true
},
{
"fieldPath":"bitsharesId",
"columnName":"bitshares_id",
"affinity":"TEXT",
"notNull":false
},
{
"fieldPath":"assetType",
"columnName":"asset_type",
"affinity":"TEXT",
"notNull":false
}
],
"primaryKey":{
"columnNames":[
"crypto_curreny_id"
],
"autoGenerate":false
},
"indices":[],
"foreignKeys":[
{
"table":"crypto_currency",
"onDelete":"NO ACTION",
"onUpdate":"NO ACTION",
"columns":[
"crypto_curreny_id"
],
"referencedColumns":[
"id"
]
}
]
},
{
"tableName":"crypto_currency_equivalence",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `from_crypto_currency_id` INTEGER NOT NULL, `to_crypto_currency_id` INTEGER NOT NULL, `value` INTEGER NOT NULL, `last_checked` INTEGER, FOREIGN KEY(`from_crypto_currency_id`) REFERENCES `crypto_currency`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`to_crypto_currency_id`) REFERENCES `crypto_currency`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"createSql":"CREATE UNIQUE INDEX `index_crypto_currency_equivalence_from_crypto_currency_id_to_crypto_currency_id` ON `${TABLE_NAME}` (`from_crypto_currency_id`, `to_crypto_currency_id`)"