mollyim-monero-wallet-sdk/demo/android/schemas/im.molly.monero.demo.data.AppDatabase/1.json
2023-10-11 00:58:13 +02:00

175 lines
5.2 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "a717d86bf72794f75768dfa37ee61831",
"entities": [
{
"tableName": "wallets",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `public_address` TEXT NOT NULL, `filename` TEXT NOT NULL, `name` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "publicAddress",
"columnName": "public_address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "filename",
"columnName": "filename",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "remote_nodes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `net_type` INTEGER NOT NULL, `uri` TEXT NOT NULL, `user` TEXT NOT NULL, `pwd` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "networkId",
"columnName": "net_type",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "uri",
"columnName": "uri",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "username",
"columnName": "user",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "password",
"columnName": "pwd",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_remote_nodes_net_type",
"unique": false,
"columnNames": [
"net_type"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_remote_nodes_net_type` ON `${TABLE_NAME}` (`net_type`)"
}
],
"foreignKeys": []
},
{
"tableName": "wallet_remote_nodes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`wallet_id` INTEGER NOT NULL, `remote_node_id` INTEGER NOT NULL, PRIMARY KEY(`wallet_id`, `remote_node_id`), FOREIGN KEY(`wallet_id`) REFERENCES `wallets`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`remote_node_id`) REFERENCES `remote_nodes`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "walletId",
"columnName": "wallet_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "remoteNodeId",
"columnName": "remote_node_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"wallet_id",
"remote_node_id"
]
},
"indices": [
{
"name": "index_wallet_remote_nodes_wallet_id",
"unique": false,
"columnNames": [
"wallet_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_wallet_remote_nodes_wallet_id` ON `${TABLE_NAME}` (`wallet_id`)"
},
{
"name": "index_wallet_remote_nodes_remote_node_id",
"unique": false,
"columnNames": [
"remote_node_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_wallet_remote_nodes_remote_node_id` ON `${TABLE_NAME}` (`remote_node_id`)"
}
],
"foreignKeys": [
{
"table": "wallets",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"wallet_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "remote_nodes",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"remote_node_id"
],
"referencedColumns": [
"id"
]
}
]
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a717d86bf72794f75768dfa37ee61831')"
]
}
}