1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 20, 5 "identityHash": "7d73d21f1bd82c9e5268b6dcf9fde2cb", 6 "entities": [ 7 { 8 "tableName": "Dependency", 9 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 10 "fields": [ 11 { 12 "fieldPath": "workSpecId", 13 "columnName": "work_spec_id", 14 "affinity": "TEXT", 15 "notNull": true 16 }, 17 { 18 "fieldPath": "prerequisiteId", 19 "columnName": "prerequisite_id", 20 "affinity": "TEXT", 21 "notNull": true 22 } 23 ], 24 "primaryKey": { 25 "autoGenerate": false, 26 "columnNames": [ 27 "work_spec_id", 28 "prerequisite_id" 29 ] 30 }, 31 "indices": [ 32 { 33 "name": "index_Dependency_work_spec_id", 34 "unique": false, 35 "columnNames": [ 36 "work_spec_id" 37 ], 38 "orders": [], 39 "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 40 }, 41 { 42 "name": "index_Dependency_prerequisite_id", 43 "unique": false, 44 "columnNames": [ 45 "prerequisite_id" 46 ], 47 "orders": [], 48 "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_prerequisite_id` ON `${TABLE_NAME}` (`prerequisite_id`)" 49 } 50 ], 51 "foreignKeys": [ 52 { 53 "table": "WorkSpec", 54 "onDelete": "CASCADE", 55 "onUpdate": "CASCADE", 56 "columns": [ 57 "work_spec_id" 58 ], 59 "referencedColumns": [ 60 "id" 61 ] 62 }, 63 { 64 "table": "WorkSpec", 65 "onDelete": "CASCADE", 66 "onUpdate": "CASCADE", 67 "columns": [ 68 "prerequisite_id" 69 ], 70 "referencedColumns": [ 71 "id" 72 ] 73 } 74 ] 75 }, 76 { 77 "tableName": "WorkSpec", 78 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT NOT NULL, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `last_enqueue_time` INTEGER NOT NULL DEFAULT -1, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `out_of_quota_policy` INTEGER NOT NULL, `period_count` INTEGER NOT NULL DEFAULT 0, `generation` INTEGER NOT NULL DEFAULT 0, `next_schedule_time_override` INTEGER NOT NULL DEFAULT 9223372036854775807, `next_schedule_time_override_generation` INTEGER NOT NULL DEFAULT 0, `stop_reason` INTEGER NOT NULL DEFAULT -256, `required_network_type` INTEGER NOT NULL, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB NOT NULL, PRIMARY KEY(`id`))", 79 "fields": [ 80 { 81 "fieldPath": "id", 82 "columnName": "id", 83 "affinity": "TEXT", 84 "notNull": true 85 }, 86 { 87 "fieldPath": "state", 88 "columnName": "state", 89 "affinity": "INTEGER", 90 "notNull": true 91 }, 92 { 93 "fieldPath": "workerClassName", 94 "columnName": "worker_class_name", 95 "affinity": "TEXT", 96 "notNull": true 97 }, 98 { 99 "fieldPath": "inputMergerClassName", 100 "columnName": "input_merger_class_name", 101 "affinity": "TEXT", 102 "notNull": true 103 }, 104 { 105 "fieldPath": "input", 106 "columnName": "input", 107 "affinity": "BLOB", 108 "notNull": true 109 }, 110 { 111 "fieldPath": "output", 112 "columnName": "output", 113 "affinity": "BLOB", 114 "notNull": true 115 }, 116 { 117 "fieldPath": "initialDelay", 118 "columnName": "initial_delay", 119 "affinity": "INTEGER", 120 "notNull": true 121 }, 122 { 123 "fieldPath": "intervalDuration", 124 "columnName": "interval_duration", 125 "affinity": "INTEGER", 126 "notNull": true 127 }, 128 { 129 "fieldPath": "flexDuration", 130 "columnName": "flex_duration", 131 "affinity": "INTEGER", 132 "notNull": true 133 }, 134 { 135 "fieldPath": "runAttemptCount", 136 "columnName": "run_attempt_count", 137 "affinity": "INTEGER", 138 "notNull": true 139 }, 140 { 141 "fieldPath": "backoffPolicy", 142 "columnName": "backoff_policy", 143 "affinity": "INTEGER", 144 "notNull": true 145 }, 146 { 147 "fieldPath": "backoffDelayDuration", 148 "columnName": "backoff_delay_duration", 149 "affinity": "INTEGER", 150 "notNull": true 151 }, 152 { 153 "fieldPath": "lastEnqueueTime", 154 "columnName": "last_enqueue_time", 155 "affinity": "INTEGER", 156 "notNull": true, 157 "defaultValue": "-1" 158 }, 159 { 160 "fieldPath": "minimumRetentionDuration", 161 "columnName": "minimum_retention_duration", 162 "affinity": "INTEGER", 163 "notNull": true 164 }, 165 { 166 "fieldPath": "scheduleRequestedAt", 167 "columnName": "schedule_requested_at", 168 "affinity": "INTEGER", 169 "notNull": true 170 }, 171 { 172 "fieldPath": "expedited", 173 "columnName": "run_in_foreground", 174 "affinity": "INTEGER", 175 "notNull": true 176 }, 177 { 178 "fieldPath": "outOfQuotaPolicy", 179 "columnName": "out_of_quota_policy", 180 "affinity": "INTEGER", 181 "notNull": true 182 }, 183 { 184 "fieldPath": "periodCount", 185 "columnName": "period_count", 186 "affinity": "INTEGER", 187 "notNull": true, 188 "defaultValue": "0" 189 }, 190 { 191 "fieldPath": "generation", 192 "columnName": "generation", 193 "affinity": "INTEGER", 194 "notNull": true, 195 "defaultValue": "0" 196 }, 197 { 198 "fieldPath": "nextScheduleTimeOverride", 199 "columnName": "next_schedule_time_override", 200 "affinity": "INTEGER", 201 "notNull": true, 202 "defaultValue": "9223372036854775807" 203 }, 204 { 205 "fieldPath": "nextScheduleTimeOverrideGeneration", 206 "columnName": "next_schedule_time_override_generation", 207 "affinity": "INTEGER", 208 "notNull": true, 209 "defaultValue": "0" 210 }, 211 { 212 "fieldPath": "stopReason", 213 "columnName": "stop_reason", 214 "affinity": "INTEGER", 215 "notNull": true, 216 "defaultValue": "-256" 217 }, 218 { 219 "fieldPath": "constraints.requiredNetworkType", 220 "columnName": "required_network_type", 221 "affinity": "INTEGER", 222 "notNull": true 223 }, 224 { 225 "fieldPath": "constraints.requiresCharging", 226 "columnName": "requires_charging", 227 "affinity": "INTEGER", 228 "notNull": true 229 }, 230 { 231 "fieldPath": "constraints.requiresDeviceIdle", 232 "columnName": "requires_device_idle", 233 "affinity": "INTEGER", 234 "notNull": true 235 }, 236 { 237 "fieldPath": "constraints.requiresBatteryNotLow", 238 "columnName": "requires_battery_not_low", 239 "affinity": "INTEGER", 240 "notNull": true 241 }, 242 { 243 "fieldPath": "constraints.requiresStorageNotLow", 244 "columnName": "requires_storage_not_low", 245 "affinity": "INTEGER", 246 "notNull": true 247 }, 248 { 249 "fieldPath": "constraints.contentTriggerUpdateDelayMillis", 250 "columnName": "trigger_content_update_delay", 251 "affinity": "INTEGER", 252 "notNull": true 253 }, 254 { 255 "fieldPath": "constraints.contentTriggerMaxDelayMillis", 256 "columnName": "trigger_max_content_delay", 257 "affinity": "INTEGER", 258 "notNull": true 259 }, 260 { 261 "fieldPath": "constraints.contentUriTriggers", 262 "columnName": "content_uri_triggers", 263 "affinity": "BLOB", 264 "notNull": true 265 } 266 ], 267 "primaryKey": { 268 "autoGenerate": false, 269 "columnNames": [ 270 "id" 271 ] 272 }, 273 "indices": [ 274 { 275 "name": "index_WorkSpec_schedule_requested_at", 276 "unique": false, 277 "columnNames": [ 278 "schedule_requested_at" 279 ], 280 "orders": [], 281 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)" 282 }, 283 { 284 "name": "index_WorkSpec_last_enqueue_time", 285 "unique": false, 286 "columnNames": [ 287 "last_enqueue_time" 288 ], 289 "orders": [], 290 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_last_enqueue_time` ON `${TABLE_NAME}` (`last_enqueue_time`)" 291 } 292 ], 293 "foreignKeys": [] 294 }, 295 { 296 "tableName": "WorkTag", 297 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 298 "fields": [ 299 { 300 "fieldPath": "tag", 301 "columnName": "tag", 302 "affinity": "TEXT", 303 "notNull": true 304 }, 305 { 306 "fieldPath": "workSpecId", 307 "columnName": "work_spec_id", 308 "affinity": "TEXT", 309 "notNull": true 310 } 311 ], 312 "primaryKey": { 313 "autoGenerate": false, 314 "columnNames": [ 315 "tag", 316 "work_spec_id" 317 ] 318 }, 319 "indices": [ 320 { 321 "name": "index_WorkTag_work_spec_id", 322 "unique": false, 323 "columnNames": [ 324 "work_spec_id" 325 ], 326 "orders": [], 327 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 328 } 329 ], 330 "foreignKeys": [ 331 { 332 "table": "WorkSpec", 333 "onDelete": "CASCADE", 334 "onUpdate": "CASCADE", 335 "columns": [ 336 "work_spec_id" 337 ], 338 "referencedColumns": [ 339 "id" 340 ] 341 } 342 ] 343 }, 344 { 345 "tableName": "SystemIdInfo", 346 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `generation` INTEGER NOT NULL DEFAULT 0, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`, `generation`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 347 "fields": [ 348 { 349 "fieldPath": "workSpecId", 350 "columnName": "work_spec_id", 351 "affinity": "TEXT", 352 "notNull": true 353 }, 354 { 355 "fieldPath": "generation", 356 "columnName": "generation", 357 "affinity": "INTEGER", 358 "notNull": true, 359 "defaultValue": "0" 360 }, 361 { 362 "fieldPath": "systemId", 363 "columnName": "system_id", 364 "affinity": "INTEGER", 365 "notNull": true 366 } 367 ], 368 "primaryKey": { 369 "autoGenerate": false, 370 "columnNames": [ 371 "work_spec_id", 372 "generation" 373 ] 374 }, 375 "indices": [], 376 "foreignKeys": [ 377 { 378 "table": "WorkSpec", 379 "onDelete": "CASCADE", 380 "onUpdate": "CASCADE", 381 "columns": [ 382 "work_spec_id" 383 ], 384 "referencedColumns": [ 385 "id" 386 ] 387 } 388 ] 389 }, 390 { 391 "tableName": "WorkName", 392 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 393 "fields": [ 394 { 395 "fieldPath": "name", 396 "columnName": "name", 397 "affinity": "TEXT", 398 "notNull": true 399 }, 400 { 401 "fieldPath": "workSpecId", 402 "columnName": "work_spec_id", 403 "affinity": "TEXT", 404 "notNull": true 405 } 406 ], 407 "primaryKey": { 408 "autoGenerate": false, 409 "columnNames": [ 410 "name", 411 "work_spec_id" 412 ] 413 }, 414 "indices": [ 415 { 416 "name": "index_WorkName_work_spec_id", 417 "unique": false, 418 "columnNames": [ 419 "work_spec_id" 420 ], 421 "orders": [], 422 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 423 } 424 ], 425 "foreignKeys": [ 426 { 427 "table": "WorkSpec", 428 "onDelete": "CASCADE", 429 "onUpdate": "CASCADE", 430 "columns": [ 431 "work_spec_id" 432 ], 433 "referencedColumns": [ 434 "id" 435 ] 436 } 437 ] 438 }, 439 { 440 "tableName": "WorkProgress", 441 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `progress` BLOB NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 442 "fields": [ 443 { 444 "fieldPath": "workSpecId", 445 "columnName": "work_spec_id", 446 "affinity": "TEXT", 447 "notNull": true 448 }, 449 { 450 "fieldPath": "progress", 451 "columnName": "progress", 452 "affinity": "BLOB", 453 "notNull": true 454 } 455 ], 456 "primaryKey": { 457 "autoGenerate": false, 458 "columnNames": [ 459 "work_spec_id" 460 ] 461 }, 462 "indices": [], 463 "foreignKeys": [ 464 { 465 "table": "WorkSpec", 466 "onDelete": "CASCADE", 467 "onUpdate": "CASCADE", 468 "columns": [ 469 "work_spec_id" 470 ], 471 "referencedColumns": [ 472 "id" 473 ] 474 } 475 ] 476 }, 477 { 478 "tableName": "Preference", 479 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))", 480 "fields": [ 481 { 482 "fieldPath": "key", 483 "columnName": "key", 484 "affinity": "TEXT", 485 "notNull": true 486 }, 487 { 488 "fieldPath": "value", 489 "columnName": "long_value", 490 "affinity": "INTEGER", 491 "notNull": false 492 } 493 ], 494 "primaryKey": { 495 "autoGenerate": false, 496 "columnNames": [ 497 "key" 498 ] 499 }, 500 "indices": [], 501 "foreignKeys": [] 502 } 503 ], 504 "views": [], 505 "setupQueries": [ 506 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 507 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7d73d21f1bd82c9e5268b6dcf9fde2cb')" 508 ] 509 } 510}