{ "formatVersion": 1, "database": { "version": 19, "identityHash": "db3263dbb69c07a043d41f1c83a892a5", "entities": [ { "tableName": "folders", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `resource_id` TEXT NOT NULL, `uri` TEXT, `name` TEXT NOT NULL, `exists` INTEGER, `parent_resource_id` TEXT, `owner_id` TEXT, `sync_status` TEXT NOT NULL, `created_in_app` INTEGER NOT NULL DEFAULT 0, `trashed_at` INTEGER, `added_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "uri", "columnName": "uri", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "exists", "columnName": "exists", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "parentResourceId", "columnName": "parent_resource_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "ownerId", "columnName": "owner_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "syncStatus", "columnName": "sync_status", "affinity": "TEXT", "notNull": true }, { "fieldPath": "createdInApp", "columnName": "created_in_app", "affinity": "INTEGER", "notNull": true, "defaultValue": "0" }, { "fieldPath": "trashedAt", "columnName": "trashed_at", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "addedAt", "columnName": "added_at", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_folders_resource_id", "unique": true, "columnNames": [ "resource_id" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_folders_resource_id` ON `${TABLE_NAME}` (`resource_id`)" }, { "name": "index_folders_uri", "unique": true, "columnNames": [ "uri" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_folders_uri` ON `${TABLE_NAME}` (`uri`)" }, { "name": "index_folders_parent_resource_id", "unique": false, "columnNames": [ "parent_resource_id" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_folders_parent_resource_id` ON `${TABLE_NAME}` (`parent_resource_id`)" } ], "foreignKeys": [] }, { "tableName": "user_preferences", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `value` TEXT NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`key`))", "fields": [ { "fieldPath": "key", "columnName": "key", "affinity": "TEXT", "notNull": true }, { "fieldPath": "value", "columnName": "value", "affinity": "TEXT", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": false, "columnNames": [ "key" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "files", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `resource_id` TEXT NOT NULL, `uri` TEXT, `name` TEXT NOT NULL, `folder_resource_id` TEXT NOT NULL, `extension` TEXT, `size` INTEGER NOT NULL, `mime_type` TEXT, `exists` INTEGER, `last_modified` INTEGER, `owner_id` TEXT, `category` TEXT, `sync_status` TEXT NOT NULL, `content` TEXT, `processed` INTEGER NOT NULL, `ocr_text` TEXT, `ocr_attempts` INTEGER NOT NULL, `ocr_queued_at` INTEGER, `bytes_uploaded` INTEGER NOT NULL, `bytes_upload_attempts` INTEGER NOT NULL, `has_content_server` INTEGER NOT NULL, `wanted_offline` INTEGER NOT NULL, `trashed_at` INTEGER, `added_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "uri", "columnName": "uri", "affinity": "TEXT", "notNull": false }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "folderResourceId", "columnName": "folder_resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "extension", "columnName": "extension", "affinity": "TEXT", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "mimeType", "columnName": "mime_type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "exists", "columnName": "exists", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "lastModified", "columnName": "last_modified", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "ownerId", "columnName": "owner_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "category", "columnName": "category", "affinity": "TEXT", "notNull": false }, { "fieldPath": "syncStatus", "columnName": "sync_status", "affinity": "TEXT", "notNull": true }, { "fieldPath": "content", "columnName": "content", "affinity": "TEXT", "notNull": false }, { "fieldPath": "processed", "columnName": "processed", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ocrText", "columnName": "ocr_text", "affinity": "TEXT", "notNull": false }, { "fieldPath": "ocrAttempts", "columnName": "ocr_attempts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ocrQueuedAt", "columnName": "ocr_queued_at", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "bytesUploaded", "columnName": "bytes_uploaded", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "bytesUploadAttempts", "columnName": "bytes_upload_attempts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "hasContentServer", "columnName": "has_content_server", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "wantedOffline", "columnName": "wanted_offline", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "trashedAt", "columnName": "trashed_at", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "addedAt", "columnName": "added_at", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_files_resource_id", "unique": true, "columnNames": [ "resource_id" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_files_resource_id` ON `${TABLE_NAME}` (`resource_id`)" }, { "name": "index_files_uri", "unique": true, "columnNames": [ "uri" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_files_uri` ON `${TABLE_NAME}` (`uri`)" }, { "name": "index_files_folder_resource_id", "unique": false, "columnNames": [ "folder_resource_id" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_files_folder_resource_id` ON `${TABLE_NAME}` (`folder_resource_id`)" }, { "name": "index_files_category", "unique": false, "columnNames": [ "category" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_files_category` ON `${TABLE_NAME}` (`category`)" }, { "name": "index_files_exists_processed_sync_status", "unique": false, "columnNames": [ "exists", "processed", "sync_status" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_files_exists_processed_sync_status` ON `${TABLE_NAME}` (`exists`, `processed`, `sync_status`)" } ], "foreignKeys": [] }, { "tableName": "pending_operations", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `device_id` TEXT, `operation_id` TEXT NOT NULL, `ref_type` TEXT, `ref_id` INTEGER, `resource_id` TEXT, `resource_type` TEXT, `operation` TEXT NOT NULL, `payload` TEXT NOT NULL, `parent_resource_id` TEXT, `status` TEXT NOT NULL, `attempts` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "deviceId", "columnName": "device_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "operationId", "columnName": "operation_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "refType", "columnName": "ref_type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "refId", "columnName": "ref_id", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "resourceType", "columnName": "resource_type", "affinity": "TEXT", "notNull": false }, { "fieldPath": "operation", "columnName": "operation", "affinity": "TEXT", "notNull": true }, { "fieldPath": "payload", "columnName": "payload", "affinity": "TEXT", "notNull": true }, { "fieldPath": "parentResourceId", "columnName": "parent_resource_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": true }, { "fieldPath": "attempts", "columnName": "attempts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "createdAt", "columnName": "created_at", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_pending_operations_device_id_operation_id", "unique": true, "columnNames": [ "device_id", "operation_id" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_pending_operations_device_id_operation_id` ON `${TABLE_NAME}` (`device_id`, `operation_id`)" }, { "name": "index_pending_operations_status", "unique": false, "columnNames": [ "status" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_pending_operations_status` ON `${TABLE_NAME}` (`status`)" }, { "name": "index_pending_operations_resource_id", "unique": false, "columnNames": [ "resource_id" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_pending_operations_resource_id` ON `${TABLE_NAME}` (`resource_id`)" }, { "name": "index_pending_operations_resource_id_operation_status", "unique": false, "columnNames": [ "resource_id", "operation", "status" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_pending_operations_resource_id_operation_status` ON `${TABLE_NAME}` (`resource_id`, `operation`, `status`)" }, { "name": "index_pending_operations_parent_resource_id", "unique": false, "columnNames": [ "parent_resource_id" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_pending_operations_parent_resource_id` ON `${TABLE_NAME}` (`parent_resource_id`)" } ], "foreignKeys": [] }, { "tableName": "scan_sessions", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `resource_id` TEXT NOT NULL, `root_folder_id` TEXT, `status` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "rootFolderId", "columnName": "root_folder_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": true }, { "fieldPath": "createdAt", "columnName": "created_at", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_scan_sessions_resource_id", "unique": true, "columnNames": [ "resource_id" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_scan_sessions_resource_id` ON `${TABLE_NAME}` (`resource_id`)" } ], "foreignKeys": [] }, { "tableName": "scan_pages", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `resource_id` TEXT NOT NULL, `session_id` INTEGER NOT NULL, `temp_uri` TEXT NOT NULL, `corners_json` TEXT NOT NULL, `width` INTEGER NOT NULL, `height` INTEGER NOT NULL, `sort_order` INTEGER NOT NULL, `status` TEXT NOT NULL, `created_at` INTEGER NOT NULL, FOREIGN KEY(`session_id`) REFERENCES `scan_sessions`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "sessionId", "columnName": "session_id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "tempUri", "columnName": "temp_uri", "affinity": "TEXT", "notNull": true }, { "fieldPath": "cornersJson", "columnName": "corners_json", "affinity": "TEXT", "notNull": true }, { "fieldPath": "width", "columnName": "width", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "height", "columnName": "height", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "sortOrder", "columnName": "sort_order", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "status", "columnName": "status", "affinity": "TEXT", "notNull": true }, { "fieldPath": "createdAt", "columnName": "created_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_scan_pages_resource_id", "unique": true, "columnNames": [ "resource_id" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_scan_pages_resource_id` ON `${TABLE_NAME}` (`resource_id`)" }, { "name": "index_scan_pages_session_id", "unique": false, "columnNames": [ "session_id" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_scan_pages_session_id` ON `${TABLE_NAME}` (`session_id`)" }, { "name": "index_scan_pages_sort_order", "unique": false, "columnNames": [ "sort_order" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_scan_pages_sort_order` ON `${TABLE_NAME}` (`sort_order`)" } ], "foreignKeys": [ { "table": "scan_sessions", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "session_id" ], "referencedColumns": [ "id" ] } ] }, { "tableName": "resource_permissions", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`resource_id` TEXT NOT NULL, `resource_type` TEXT NOT NULL, `effective_access` TEXT NOT NULL, `owner_id` TEXT, `shared_by_id` TEXT, `expires_at` INTEGER, `cached_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`resource_id`))", "fields": [ { "fieldPath": "resourceId", "columnName": "resource_id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "resourceType", "columnName": "resource_type", "affinity": "TEXT", "notNull": true }, { "fieldPath": "effectiveAccess", "columnName": "effective_access", "affinity": "TEXT", "notNull": true }, { "fieldPath": "ownerId", "columnName": "owner_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "sharedById", "columnName": "shared_by_id", "affinity": "TEXT", "notNull": false }, { "fieldPath": "expiresAt", "columnName": "expires_at", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "cachedAt", "columnName": "cached_at", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "updatedAt", "columnName": "updated_at", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": false, "columnNames": [ "resource_id" ] }, "indices": [ { "name": "index_resource_permissions_expires_at", "unique": false, "columnNames": [ "expires_at" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_resource_permissions_expires_at` ON `${TABLE_NAME}` (`expires_at`)" } ], "foreignKeys": [] } ], "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, 'db3263dbb69c07a043d41f1c83a892a5')" ] } }