123 lines
3.6 KiB
JSON
123 lines
3.6 KiB
JSON
|
{
|
||
|
"formatVersion": 1,
|
||
|
"database": {
|
||
|
"version": 1,
|
||
|
"identityHash": "cf6d8bdd8e16b3f92043f9430524c80d",
|
||
|
"entities": [
|
||
|
{
|
||
|
"tableName": "tab_collections",
|
||
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `updated_at` INTEGER NOT NULL, `created_at` INTEGER NOT NULL)",
|
||
|
"fields": [
|
||
|
{
|
||
|
"fieldPath": "id",
|
||
|
"columnName": "id",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": false
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "title",
|
||
|
"columnName": "title",
|
||
|
"affinity": "TEXT",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "updatedAt",
|
||
|
"columnName": "updated_at",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "createdAt",
|
||
|
"columnName": "created_at",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": true
|
||
|
}
|
||
|
],
|
||
|
"primaryKey": {
|
||
|
"columnNames": [
|
||
|
"id"
|
||
|
],
|
||
|
"autoGenerate": true
|
||
|
},
|
||
|
"indices": [],
|
||
|
"foreignKeys": []
|
||
|
},
|
||
|
{
|
||
|
"tableName": "tabs",
|
||
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` TEXT NOT NULL, `url` TEXT NOT NULL, `stat_file` TEXT NOT NULL, `tab_collection_id` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, FOREIGN KEY(`tab_collection_id`) REFERENCES `tab_collections`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
||
|
"fields": [
|
||
|
{
|
||
|
"fieldPath": "id",
|
||
|
"columnName": "id",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": false
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "title",
|
||
|
"columnName": "title",
|
||
|
"affinity": "TEXT",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "url",
|
||
|
"columnName": "url",
|
||
|
"affinity": "TEXT",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "stateFile",
|
||
|
"columnName": "stat_file",
|
||
|
"affinity": "TEXT",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "tabCollectionId",
|
||
|
"columnName": "tab_collection_id",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": true
|
||
|
},
|
||
|
{
|
||
|
"fieldPath": "createdAt",
|
||
|
"columnName": "created_at",
|
||
|
"affinity": "INTEGER",
|
||
|
"notNull": true
|
||
|
}
|
||
|
],
|
||
|
"primaryKey": {
|
||
|
"columnNames": [
|
||
|
"id"
|
||
|
],
|
||
|
"autoGenerate": true
|
||
|
},
|
||
|
"indices": [
|
||
|
{
|
||
|
"name": "index_tabs_tab_collection_id",
|
||
|
"unique": false,
|
||
|
"columnNames": [
|
||
|
"tab_collection_id"
|
||
|
],
|
||
|
"createSql": "CREATE INDEX `index_tabs_tab_collection_id` ON `${TABLE_NAME}` (`tab_collection_id`)"
|
||
|
}
|
||
|
],
|
||
|
"foreignKeys": [
|
||
|
{
|
||
|
"table": "tab_collections",
|
||
|
"onDelete": "CASCADE",
|
||
|
"onUpdate": "NO ACTION",
|
||
|
"columns": [
|
||
|
"tab_collection_id"
|
||
|
],
|
||
|
"referencedColumns": [
|
||
|
"id"
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"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, \"cf6d8bdd8e16b3f92043f9430524c80d\")"
|
||
|
]
|
||
|
}
|
||
|
}
|