1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 11, 5 "identityHash": "31dd21ebb478946b3d4dde78b2bccf6f", 6 "entities": [ 7 { 8 "tableName": "updates", 9 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` BLOB NOT NULL, `commit_time` INTEGER NOT NULL, `runtime_version` TEXT NOT NULL, `scope_key` TEXT NOT NULL, `launch_asset_id` INTEGER, `manifest` TEXT, `status` INTEGER NOT NULL, `keep` INTEGER NOT NULL, `last_accessed` INTEGER NOT NULL, `successful_launch_count` INTEGER NOT NULL DEFAULT 0, `failed_launch_count` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`), FOREIGN KEY(`launch_asset_id`) REFERENCES `assets`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", 10 "fields": [ 11 { 12 "fieldPath": "id", 13 "columnName": "id", 14 "affinity": "BLOB", 15 "notNull": true 16 }, 17 { 18 "fieldPath": "commitTime", 19 "columnName": "commit_time", 20 "affinity": "INTEGER", 21 "notNull": true 22 }, 23 { 24 "fieldPath": "runtimeVersion", 25 "columnName": "runtime_version", 26 "affinity": "TEXT", 27 "notNull": true 28 }, 29 { 30 "fieldPath": "scopeKey", 31 "columnName": "scope_key", 32 "affinity": "TEXT", 33 "notNull": true 34 }, 35 { 36 "fieldPath": "launchAssetId", 37 "columnName": "launch_asset_id", 38 "affinity": "INTEGER", 39 "notNull": false 40 }, 41 { 42 "fieldPath": "manifest", 43 "columnName": "manifest", 44 "affinity": "TEXT", 45 "notNull": false 46 }, 47 { 48 "fieldPath": "status", 49 "columnName": "status", 50 "affinity": "INTEGER", 51 "notNull": true 52 }, 53 { 54 "fieldPath": "keep", 55 "columnName": "keep", 56 "affinity": "INTEGER", 57 "notNull": true 58 }, 59 { 60 "fieldPath": "lastAccessed", 61 "columnName": "last_accessed", 62 "affinity": "INTEGER", 63 "notNull": true 64 }, 65 { 66 "fieldPath": "successfulLaunchCount", 67 "columnName": "successful_launch_count", 68 "affinity": "INTEGER", 69 "notNull": true, 70 "defaultValue": "0" 71 }, 72 { 73 "fieldPath": "failedLaunchCount", 74 "columnName": "failed_launch_count", 75 "affinity": "INTEGER", 76 "notNull": true, 77 "defaultValue": "0" 78 } 79 ], 80 "primaryKey": { 81 "columnNames": [ 82 "id" 83 ], 84 "autoGenerate": false 85 }, 86 "indices": [ 87 { 88 "name": "index_updates_launch_asset_id", 89 "unique": false, 90 "columnNames": [ 91 "launch_asset_id" 92 ], 93 "orders": [], 94 "createSql": "CREATE INDEX IF NOT EXISTS `index_updates_launch_asset_id` ON `${TABLE_NAME}` (`launch_asset_id`)" 95 }, 96 { 97 "name": "index_updates_scope_key_commit_time", 98 "unique": true, 99 "columnNames": [ 100 "scope_key", 101 "commit_time" 102 ], 103 "orders": [], 104 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_updates_scope_key_commit_time` ON `${TABLE_NAME}` (`scope_key`, `commit_time`)" 105 } 106 ], 107 "foreignKeys": [ 108 { 109 "table": "assets", 110 "onDelete": "CASCADE", 111 "onUpdate": "NO ACTION", 112 "columns": [ 113 "launch_asset_id" 114 ], 115 "referencedColumns": [ 116 "id" 117 ] 118 } 119 ] 120 }, 121 { 122 "tableName": "updates_assets", 123 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`update_id` BLOB NOT NULL, `asset_id` INTEGER NOT NULL, PRIMARY KEY(`update_id`, `asset_id`), FOREIGN KEY(`update_id`) REFERENCES `updates`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`asset_id`) REFERENCES `assets`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", 124 "fields": [ 125 { 126 "fieldPath": "updateId", 127 "columnName": "update_id", 128 "affinity": "BLOB", 129 "notNull": true 130 }, 131 { 132 "fieldPath": "assetId", 133 "columnName": "asset_id", 134 "affinity": "INTEGER", 135 "notNull": true 136 } 137 ], 138 "primaryKey": { 139 "columnNames": [ 140 "update_id", 141 "asset_id" 142 ], 143 "autoGenerate": false 144 }, 145 "indices": [ 146 { 147 "name": "index_updates_assets_asset_id", 148 "unique": false, 149 "columnNames": [ 150 "asset_id" 151 ], 152 "orders": [], 153 "createSql": "CREATE INDEX IF NOT EXISTS `index_updates_assets_asset_id` ON `${TABLE_NAME}` (`asset_id`)" 154 } 155 ], 156 "foreignKeys": [ 157 { 158 "table": "updates", 159 "onDelete": "CASCADE", 160 "onUpdate": "NO ACTION", 161 "columns": [ 162 "update_id" 163 ], 164 "referencedColumns": [ 165 "id" 166 ] 167 }, 168 { 169 "table": "assets", 170 "onDelete": "CASCADE", 171 "onUpdate": "NO ACTION", 172 "columns": [ 173 "asset_id" 174 ], 175 "referencedColumns": [ 176 "id" 177 ] 178 } 179 ] 180 }, 181 { 182 "tableName": "assets", 183 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT, `type` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `url` TEXT, `headers` TEXT, `extra_request_headers` TEXT, `metadata` TEXT, `download_time` INTEGER, `relative_path` TEXT, `hash` BLOB, `hash_type` INTEGER NOT NULL, `expected_hash` TEXT, `marked_for_deletion` INTEGER NOT NULL)", 184 "fields": [ 185 { 186 "fieldPath": "key", 187 "columnName": "key", 188 "affinity": "TEXT", 189 "notNull": false 190 }, 191 { 192 "fieldPath": "type", 193 "columnName": "type", 194 "affinity": "TEXT", 195 "notNull": false 196 }, 197 { 198 "fieldPath": "id", 199 "columnName": "id", 200 "affinity": "INTEGER", 201 "notNull": true 202 }, 203 { 204 "fieldPath": "url", 205 "columnName": "url", 206 "affinity": "TEXT", 207 "notNull": false 208 }, 209 { 210 "fieldPath": "headers", 211 "columnName": "headers", 212 "affinity": "TEXT", 213 "notNull": false 214 }, 215 { 216 "fieldPath": "extraRequestHeaders", 217 "columnName": "extra_request_headers", 218 "affinity": "TEXT", 219 "notNull": false 220 }, 221 { 222 "fieldPath": "metadata", 223 "columnName": "metadata", 224 "affinity": "TEXT", 225 "notNull": false 226 }, 227 { 228 "fieldPath": "downloadTime", 229 "columnName": "download_time", 230 "affinity": "INTEGER", 231 "notNull": false 232 }, 233 { 234 "fieldPath": "relativePath", 235 "columnName": "relative_path", 236 "affinity": "TEXT", 237 "notNull": false 238 }, 239 { 240 "fieldPath": "hash", 241 "columnName": "hash", 242 "affinity": "BLOB", 243 "notNull": false 244 }, 245 { 246 "fieldPath": "hashType", 247 "columnName": "hash_type", 248 "affinity": "INTEGER", 249 "notNull": true 250 }, 251 { 252 "fieldPath": "expectedHash", 253 "columnName": "expected_hash", 254 "affinity": "TEXT", 255 "notNull": false 256 }, 257 { 258 "fieldPath": "markedForDeletion", 259 "columnName": "marked_for_deletion", 260 "affinity": "INTEGER", 261 "notNull": true 262 } 263 ], 264 "primaryKey": { 265 "columnNames": [ 266 "id" 267 ], 268 "autoGenerate": true 269 }, 270 "indices": [ 271 { 272 "name": "index_assets_key", 273 "unique": true, 274 "columnNames": [ 275 "key" 276 ], 277 "orders": [], 278 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_assets_key` ON `${TABLE_NAME}` (`key`)" 279 } 280 ], 281 "foreignKeys": [] 282 }, 283 { 284 "tableName": "json_data", 285 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `value` TEXT NOT NULL, `last_updated` INTEGER NOT NULL, `scope_key` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", 286 "fields": [ 287 { 288 "fieldPath": "key", 289 "columnName": "key", 290 "affinity": "TEXT", 291 "notNull": true 292 }, 293 { 294 "fieldPath": "value", 295 "columnName": "value", 296 "affinity": "TEXT", 297 "notNull": true 298 }, 299 { 300 "fieldPath": "lastUpdated", 301 "columnName": "last_updated", 302 "affinity": "INTEGER", 303 "notNull": true 304 }, 305 { 306 "fieldPath": "scopeKey", 307 "columnName": "scope_key", 308 "affinity": "TEXT", 309 "notNull": true 310 }, 311 { 312 "fieldPath": "id", 313 "columnName": "id", 314 "affinity": "INTEGER", 315 "notNull": true 316 } 317 ], 318 "primaryKey": { 319 "columnNames": [ 320 "id" 321 ], 322 "autoGenerate": true 323 }, 324 "indices": [ 325 { 326 "name": "index_json_data_scope_key", 327 "unique": false, 328 "columnNames": [ 329 "scope_key" 330 ], 331 "orders": [], 332 "createSql": "CREATE INDEX IF NOT EXISTS `index_json_data_scope_key` ON `${TABLE_NAME}` (`scope_key`)" 333 } 334 ], 335 "foreignKeys": [] 336 } 337 ], 338 "views": [], 339 "setupQueries": [ 340 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 341 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '31dd21ebb478946b3d4dde78b2bccf6f')" 342 ] 343 } 344}