98 lines
2.8 KiB
JSON
98 lines
2.8 KiB
JSON
{
|
|
"formatVersion": 1,
|
|
"database": {
|
|
"version": 2,
|
|
"identityHash": "1c3c3246ea0f368ec95b740b2f50e18b",
|
|
"entities": [
|
|
{
|
|
"tableName": "Message",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `text` TEXT NOT NULL, `source` TEXT NOT NULL DEFAULT 'Local', `state` TEXT NOT NULL, PRIMARY KEY(`id`))",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "text",
|
|
"columnName": "text",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "source",
|
|
"columnName": "source",
|
|
"affinity": "TEXT",
|
|
"notNull": true,
|
|
"defaultValue": "'Local'"
|
|
},
|
|
{
|
|
"fieldPath": "state",
|
|
"columnName": "state",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"id"
|
|
],
|
|
"autoGenerate": false
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": []
|
|
},
|
|
{
|
|
"tableName": "MessageRecipient",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`messageId` TEXT NOT NULL, `phoneNumber` TEXT NOT NULL, `state` TEXT NOT NULL, PRIMARY KEY(`messageId`, `phoneNumber`), FOREIGN KEY(`messageId`) REFERENCES `Message`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "messageId",
|
|
"columnName": "messageId",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "phoneNumber",
|
|
"columnName": "phoneNumber",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "state",
|
|
"columnName": "state",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"columnNames": [
|
|
"messageId",
|
|
"phoneNumber"
|
|
],
|
|
"autoGenerate": false
|
|
},
|
|
"indices": [],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "Message",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"messageId"
|
|
],
|
|
"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, '1c3c3246ea0f368ec95b740b2f50e18b')"
|
|
]
|
|
}
|
|
} |