Flocon/FloconDesktop/composeApp/schemas/com.florent37.flocondesktop.common.db.AppDatabase/2.json
Florent Champigny 8e0c559fed initial import
2025-07-29 21:12:28 +02:00

448 lines
No EOL
14 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "341cbcad46bebcd127961e61517de5da",
"entities": [
{
"tableName": "FloconHttpRequestEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `deviceId` TEXT NOT NULL, `url` TEXT NOT NULL, `method` TEXT NOT NULL, `startTime` INTEGER NOT NULL, `durationMs` REAL NOT NULL, `requestHeaders` TEXT NOT NULL, `requestBody` TEXT, `requestByteSize` INTEGER NOT NULL, `responseHttpCode` INTEGER NOT NULL, `responseContentType` TEXT, `responseBody` TEXT, `responseHeaders` TEXT NOT NULL, `responseByteSize` INTEGER NOT NULL, PRIMARY KEY(`uuid`))",
"fields": [
{
"fieldPath": "uuid",
"columnName": "uuid",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "infos.url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "infos.method",
"columnName": "method",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "infos.startTime",
"columnName": "startTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "infos.durationMs",
"columnName": "durationMs",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "infos.requestHeaders",
"columnName": "requestHeaders",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "infos.requestBody",
"columnName": "requestBody",
"affinity": "TEXT"
},
{
"fieldPath": "infos.requestByteSize",
"columnName": "requestByteSize",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "infos.responseHttpCode",
"columnName": "responseHttpCode",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "infos.responseContentType",
"columnName": "responseContentType",
"affinity": "TEXT"
},
{
"fieldPath": "infos.responseBody",
"columnName": "responseBody",
"affinity": "TEXT"
},
{
"fieldPath": "infos.responseHeaders",
"columnName": "responseHeaders",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "infos.responseByteSize",
"columnName": "responseByteSize",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uuid"
]
}
},
{
"tableName": "FileEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `deviceId` TEXT NOT NULL, `name` TEXT NOT NULL, `isDirectory` INTEGER NOT NULL, `path` TEXT NOT NULL, `parentPath` TEXT NOT NULL, `size` INTEGER NOT NULL, `lastModifiedTimestamp` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isDirectory",
"columnName": "isDirectory",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "path",
"columnName": "path",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentPath",
"columnName": "parentPath",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "size",
"columnName": "size",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastModifiedTimestamp",
"columnName": "lastModifiedTimestamp",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
}
},
{
"tableName": "DashboardEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `deviceId` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_DashboardEntity_deviceId",
"unique": false,
"columnNames": [
"deviceId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_DashboardEntity_deviceId` ON `${TABLE_NAME}` (`deviceId`)"
}
]
},
{
"tableName": "DashboardSectionEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `dashboardId` INTEGER NOT NULL, `sectionOrder` INTEGER NOT NULL, `name` TEXT NOT NULL, FOREIGN KEY(`dashboardId`) REFERENCES `DashboardEntity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "dashboardId",
"columnName": "dashboardId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "sectionOrder",
"columnName": "sectionOrder",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_DashboardSectionEntity_dashboardId",
"unique": false,
"columnNames": [
"dashboardId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_DashboardSectionEntity_dashboardId` ON `${TABLE_NAME}` (`dashboardId`)"
},
{
"name": "index_DashboardSectionEntity_dashboardId_sectionOrder",
"unique": true,
"columnNames": [
"dashboardId",
"sectionOrder"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_DashboardSectionEntity_dashboardId_sectionOrder` ON `${TABLE_NAME}` (`dashboardId`, `sectionOrder`)"
}
],
"foreignKeys": [
{
"table": "DashboardEntity",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"dashboardId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "DashboardElementEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `sectionId` INTEGER NOT NULL, `elementOrder` INTEGER NOT NULL, `button_text` TEXT, `button_actionId` TEXT, `text_label` TEXT, `text_value` TEXT, FOREIGN KEY(`sectionId`) REFERENCES `DashboardSectionEntity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "sectionId",
"columnName": "sectionId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "elementOrder",
"columnName": "elementOrder",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "button.text",
"columnName": "button_text",
"affinity": "TEXT"
},
{
"fieldPath": "button.actionId",
"columnName": "button_actionId",
"affinity": "TEXT"
},
{
"fieldPath": "text.label",
"columnName": "text_label",
"affinity": "TEXT"
},
{
"fieldPath": "text.value",
"columnName": "text_value",
"affinity": "TEXT"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_DashboardElementEntity_sectionId",
"unique": false,
"columnNames": [
"sectionId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_DashboardElementEntity_sectionId` ON `${TABLE_NAME}` (`sectionId`)"
},
{
"name": "index_DashboardElementEntity_sectionId_elementOrder",
"unique": true,
"columnNames": [
"sectionId",
"elementOrder"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_DashboardElementEntity_sectionId_elementOrder` ON `${TABLE_NAME}` (`sectionId`, `elementOrder`)"
}
],
"foreignKeys": [
{
"table": "DashboardSectionEntity",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"sectionId"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "TableEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `deviceId` TEXT NOT NULL, `name` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "deviceId",
"columnName": "deviceId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_TableEntity_deviceId_name",
"unique": true,
"columnNames": [
"deviceId",
"name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_TableEntity_deviceId_name` ON `${TABLE_NAME}` (`deviceId`, `name`)"
}
]
},
{
"tableName": "TableItemEntity",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tableId` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL, `columnName` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`tableId`, `createdAt`, `value`), FOREIGN KEY(`tableId`) REFERENCES `TableEntity`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "tableId",
"columnName": "tableId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "columnName",
"columnName": "columnName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"tableId",
"createdAt",
"value"
]
},
"foreignKeys": [
{
"table": "TableEntity",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"tableId"
],
"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, '341cbcad46bebcd127961e61517de5da')"
]
}
}