1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 18, 5 "identityHash": "682ed85299b53f31ab155d1b8216c06e", 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, `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, `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 }, 158 { 159 "fieldPath": "minimumRetentionDuration", 160 "columnName": "minimum_retention_duration", 161 "affinity": "INTEGER", 162 "notNull": true 163 }, 164 { 165 "fieldPath": "scheduleRequestedAt", 166 "columnName": "schedule_requested_at", 167 "affinity": "INTEGER", 168 "notNull": true 169 }, 170 { 171 "fieldPath": "expedited", 172 "columnName": "run_in_foreground", 173 "affinity": "INTEGER", 174 "notNull": true 175 }, 176 { 177 "fieldPath": "outOfQuotaPolicy", 178 "columnName": "out_of_quota_policy", 179 "affinity": "INTEGER", 180 "notNull": true 181 }, 182 { 183 "fieldPath": "periodCount", 184 "columnName": "period_count", 185 "affinity": "INTEGER", 186 "notNull": true, 187 "defaultValue": "0" 188 }, 189 { 190 "fieldPath": "generation", 191 "columnName": "generation", 192 "affinity": "INTEGER", 193 "notNull": true, 194 "defaultValue": "0" 195 }, 196 { 197 "fieldPath": "nextScheduleTimeOverride", 198 "columnName": "next_schedule_time_override", 199 "affinity": "INTEGER", 200 "notNull": true, 201 "defaultValue": "9223372036854775807" 202 }, 203 { 204 "fieldPath": "nextScheduleTimeOverrideGeneration", 205 "columnName": "next_schedule_time_override_generation", 206 "affinity": "INTEGER", 207 "notNull": true, 208 "defaultValue": "0" 209 }, 210 { 211 "fieldPath": "constraints.requiredNetworkType", 212 "columnName": "required_network_type", 213 "affinity": "INTEGER", 214 "notNull": true 215 }, 216 { 217 "fieldPath": "constraints.requiresCharging", 218 "columnName": "requires_charging", 219 "affinity": "INTEGER", 220 "notNull": true 221 }, 222 { 223 "fieldPath": "constraints.requiresDeviceIdle", 224 "columnName": "requires_device_idle", 225 "affinity": "INTEGER", 226 "notNull": true 227 }, 228 { 229 "fieldPath": "constraints.requiresBatteryNotLow", 230 "columnName": "requires_battery_not_low", 231 "affinity": "INTEGER", 232 "notNull": true 233 }, 234 { 235 "fieldPath": "constraints.requiresStorageNotLow", 236 "columnName": "requires_storage_not_low", 237 "affinity": "INTEGER", 238 "notNull": true 239 }, 240 { 241 "fieldPath": "constraints.contentTriggerUpdateDelayMillis", 242 "columnName": "trigger_content_update_delay", 243 "affinity": "INTEGER", 244 "notNull": true 245 }, 246 { 247 "fieldPath": "constraints.contentTriggerMaxDelayMillis", 248 "columnName": "trigger_max_content_delay", 249 "affinity": "INTEGER", 250 "notNull": true 251 }, 252 { 253 "fieldPath": "constraints.contentUriTriggers", 254 "columnName": "content_uri_triggers", 255 "affinity": "BLOB", 256 "notNull": true 257 } 258 ], 259 "primaryKey": { 260 "autoGenerate": false, 261 "columnNames": [ 262 "id" 263 ] 264 }, 265 "indices": [ 266 { 267 "name": "index_WorkSpec_schedule_requested_at", 268 "unique": false, 269 "columnNames": [ 270 "schedule_requested_at" 271 ], 272 "orders": [], 273 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)" 274 }, 275 { 276 "name": "index_WorkSpec_last_enqueue_time", 277 "unique": false, 278 "columnNames": [ 279 "last_enqueue_time" 280 ], 281 "orders": [], 282 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_last_enqueue_time` ON `${TABLE_NAME}` (`last_enqueue_time`)" 283 } 284 ], 285 "foreignKeys": [] 286 }, 287 { 288 "tableName": "WorkTag", 289 "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 )", 290 "fields": [ 291 { 292 "fieldPath": "tag", 293 "columnName": "tag", 294 "affinity": "TEXT", 295 "notNull": true 296 }, 297 { 298 "fieldPath": "workSpecId", 299 "columnName": "work_spec_id", 300 "affinity": "TEXT", 301 "notNull": true 302 } 303 ], 304 "primaryKey": { 305 "autoGenerate": false, 306 "columnNames": [ 307 "tag", 308 "work_spec_id" 309 ] 310 }, 311 "indices": [ 312 { 313 "name": "index_WorkTag_work_spec_id", 314 "unique": false, 315 "columnNames": [ 316 "work_spec_id" 317 ], 318 "orders": [], 319 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 320 } 321 ], 322 "foreignKeys": [ 323 { 324 "table": "WorkSpec", 325 "onDelete": "CASCADE", 326 "onUpdate": "CASCADE", 327 "columns": [ 328 "work_spec_id" 329 ], 330 "referencedColumns": [ 331 "id" 332 ] 333 } 334 ] 335 }, 336 { 337 "tableName": "SystemIdInfo", 338 "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 )", 339 "fields": [ 340 { 341 "fieldPath": "workSpecId", 342 "columnName": "work_spec_id", 343 "affinity": "TEXT", 344 "notNull": true 345 }, 346 { 347 "fieldPath": "generation", 348 "columnName": "generation", 349 "affinity": "INTEGER", 350 "notNull": true, 351 "defaultValue": "0" 352 }, 353 { 354 "fieldPath": "systemId", 355 "columnName": "system_id", 356 "affinity": "INTEGER", 357 "notNull": true 358 } 359 ], 360 "primaryKey": { 361 "autoGenerate": false, 362 "columnNames": [ 363 "work_spec_id", 364 "generation" 365 ] 366 }, 367 "indices": [], 368 "foreignKeys": [ 369 { 370 "table": "WorkSpec", 371 "onDelete": "CASCADE", 372 "onUpdate": "CASCADE", 373 "columns": [ 374 "work_spec_id" 375 ], 376 "referencedColumns": [ 377 "id" 378 ] 379 } 380 ] 381 }, 382 { 383 "tableName": "WorkName", 384 "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 )", 385 "fields": [ 386 { 387 "fieldPath": "name", 388 "columnName": "name", 389 "affinity": "TEXT", 390 "notNull": true 391 }, 392 { 393 "fieldPath": "workSpecId", 394 "columnName": "work_spec_id", 395 "affinity": "TEXT", 396 "notNull": true 397 } 398 ], 399 "primaryKey": { 400 "autoGenerate": false, 401 "columnNames": [ 402 "name", 403 "work_spec_id" 404 ] 405 }, 406 "indices": [ 407 { 408 "name": "index_WorkName_work_spec_id", 409 "unique": false, 410 "columnNames": [ 411 "work_spec_id" 412 ], 413 "orders": [], 414 "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 415 } 416 ], 417 "foreignKeys": [ 418 { 419 "table": "WorkSpec", 420 "onDelete": "CASCADE", 421 "onUpdate": "CASCADE", 422 "columns": [ 423 "work_spec_id" 424 ], 425 "referencedColumns": [ 426 "id" 427 ] 428 } 429 ] 430 }, 431 { 432 "tableName": "WorkProgress", 433 "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 )", 434 "fields": [ 435 { 436 "fieldPath": "workSpecId", 437 "columnName": "work_spec_id", 438 "affinity": "TEXT", 439 "notNull": true 440 }, 441 { 442 "fieldPath": "progress", 443 "columnName": "progress", 444 "affinity": "BLOB", 445 "notNull": true 446 } 447 ], 448 "primaryKey": { 449 "autoGenerate": false, 450 "columnNames": [ 451 "work_spec_id" 452 ] 453 }, 454 "indices": [], 455 "foreignKeys": [ 456 { 457 "table": "WorkSpec", 458 "onDelete": "CASCADE", 459 "onUpdate": "CASCADE", 460 "columns": [ 461 "work_spec_id" 462 ], 463 "referencedColumns": [ 464 "id" 465 ] 466 } 467 ] 468 }, 469 { 470 "tableName": "Preference", 471 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))", 472 "fields": [ 473 { 474 "fieldPath": "key", 475 "columnName": "key", 476 "affinity": "TEXT", 477 "notNull": true 478 }, 479 { 480 "fieldPath": "value", 481 "columnName": "long_value", 482 "affinity": "INTEGER", 483 "notNull": false 484 } 485 ], 486 "primaryKey": { 487 "autoGenerate": false, 488 "columnNames": [ 489 "key" 490 ] 491 }, 492 "indices": [], 493 "foreignKeys": [] 494 } 495 ], 496 "views": [], 497 "setupQueries": [ 498 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 499 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '682ed85299b53f31ab155d1b8216c06e')" 500 ] 501 } 502}