Files
Kazier/mobile-kotlin/app/schemas/com.kazier.mobile.data.local.AppDatabase/22.json
T
venture 37dc36f1f2 V3 S5 : graphe documentaire + doublons + collections
Backend : resource_links + scan_session_id (000021), réconciliation
déterministe (same_scan outbox, doublons SHA-256 à l'upload + backfill,
same_issuer/référence via faits effectifs, verdicts préservés, élagage
auto), GET /files/:id/relations + verdict (owner-only),
GET /duplicates (groupes + gain récupérable). Tests service + handlers
+ migrations.

Mobile (Room v22) : links + collections, scanSessionId dans les creates
de scan, LinksRepository (sync + verdicts REST), « Voir aussi » dans la
fiche (verdict infirmer/re-confirmer), écran Doublons (garder le plus
récent), collections locales (sauver/rejouer/supprimer). FR/EN.

Contrat docs/api-v1.md (/relations, pas /links — pris par le partage),
V3.md (S5 livré, version_of non matérialisé).
2026-09-26 11:16:35 +02:00

1019 lines
31 KiB
JSON

{
"formatVersion": 1,
"database": {
"version": 22,
"identityHash": "f9553fe5b7c9e82ec76d0034b71d193d",
"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": []
},
{
"tableName": "resource_facts",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `resource_id` TEXT NOT NULL, `fact_type` TEXT NOT NULL, `value_text` TEXT, `value_num` REAL, `value_date` TEXT, `confidence` REAL NOT NULL, `origin` TEXT 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": "factType",
"columnName": "fact_type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "valueText",
"columnName": "value_text",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "valueNum",
"columnName": "value_num",
"affinity": "REAL",
"notNull": false
},
{
"fieldPath": "valueDate",
"columnName": "value_date",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "confidence",
"columnName": "confidence",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "origin",
"columnName": "origin",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "updatedAt",
"columnName": "updated_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_resource_facts_resource_id",
"unique": false,
"columnNames": [
"resource_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_resource_facts_resource_id` ON `${TABLE_NAME}` (`resource_id`)"
}
],
"foreignKeys": []
},
{
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "simple",
"tokenizerArgs": [],
"contentTable": "",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [],
"tableName": "files_fts",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`name` TEXT NOT NULL, `body` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "body",
"columnName": "body",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"rowid"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "resource_links",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `from_id` TEXT NOT NULL, `to_id` TEXT NOT NULL, `link_type` TEXT NOT NULL, `confidence` REAL NOT NULL, `created_by` TEXT NOT NULL, `updated_at` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "fromId",
"columnName": "from_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "toId",
"columnName": "to_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "linkType",
"columnName": "link_type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "confidence",
"columnName": "confidence",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "createdBy",
"columnName": "created_by",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "updatedAt",
"columnName": "updated_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_resource_links_from_id_to_id_link_type",
"unique": true,
"columnNames": [
"from_id",
"to_id",
"link_type"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_resource_links_from_id_to_id_link_type` ON `${TABLE_NAME}` (`from_id`, `to_id`, `link_type`)"
},
{
"name": "index_resource_links_to_id",
"unique": false,
"columnNames": [
"to_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_resource_links_to_id` ON `${TABLE_NAME}` (`to_id`)"
}
],
"foreignKeys": []
},
{
"tableName": "collections",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `query` TEXT NOT NULL, `facets_json` TEXT NOT NULL, `category` TEXT, `created_at` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "query",
"columnName": "query",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "facetsJson",
"columnName": "facets_json",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_collections_name",
"unique": true,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_collections_name` ON `${TABLE_NAME}` (`name`)"
}
],
"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, 'f9553fe5b7c9e82ec76d0034b71d193d')"
]
}
}