1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 9, 5 "identityHash": "9621c84c6c5f8cde54531f1ca95b7d2b", 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 "columnNames": [ 26 "work_spec_id", 27 "prerequisite_id" 28 ], 29 "autoGenerate": false 30 }, 31 "indices": [ 32 { 33 "name": "index_Dependency_work_spec_id", 34 "unique": false, 35 "columnNames": [ 36 "work_spec_id" 37 ], 38 "createSql": "CREATE INDEX `index_Dependency_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 39 }, 40 { 41 "name": "index_Dependency_prerequisite_id", 42 "unique": false, 43 "columnNames": [ 44 "prerequisite_id" 45 ], 46 "createSql": "CREATE INDEX `index_Dependency_prerequisite_id` ON `${TABLE_NAME}` (`prerequisite_id`)" 47 } 48 ], 49 "foreignKeys": [ 50 { 51 "table": "WorkSpec", 52 "onDelete": "CASCADE", 53 "onUpdate": "CASCADE", 54 "columns": [ 55 "work_spec_id" 56 ], 57 "referencedColumns": [ 58 "id" 59 ] 60 }, 61 { 62 "table": "WorkSpec", 63 "onDelete": "CASCADE", 64 "onUpdate": "CASCADE", 65 "columns": [ 66 "prerequisite_id" 67 ], 68 "referencedColumns": [ 69 "id" 70 ] 71 } 72 ] 73 }, 74 { 75 "tableName": "WorkSpec", 76 "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, `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, `period_start_time` INTEGER NOT NULL, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `required_network_type` INTEGER, `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, PRIMARY KEY(`id`))", 77 "fields": [ 78 { 79 "fieldPath": "id", 80 "columnName": "id", 81 "affinity": "TEXT", 82 "notNull": true 83 }, 84 { 85 "fieldPath": "state", 86 "columnName": "state", 87 "affinity": "INTEGER", 88 "notNull": true 89 }, 90 { 91 "fieldPath": "workerClassName", 92 "columnName": "worker_class_name", 93 "affinity": "TEXT", 94 "notNull": true 95 }, 96 { 97 "fieldPath": "inputMergerClassName", 98 "columnName": "input_merger_class_name", 99 "affinity": "TEXT", 100 "notNull": false 101 }, 102 { 103 "fieldPath": "input", 104 "columnName": "input", 105 "affinity": "BLOB", 106 "notNull": true 107 }, 108 { 109 "fieldPath": "output", 110 "columnName": "output", 111 "affinity": "BLOB", 112 "notNull": true 113 }, 114 { 115 "fieldPath": "initialDelay", 116 "columnName": "initial_delay", 117 "affinity": "INTEGER", 118 "notNull": true 119 }, 120 { 121 "fieldPath": "intervalDuration", 122 "columnName": "interval_duration", 123 "affinity": "INTEGER", 124 "notNull": true 125 }, 126 { 127 "fieldPath": "flexDuration", 128 "columnName": "flex_duration", 129 "affinity": "INTEGER", 130 "notNull": true 131 }, 132 { 133 "fieldPath": "runAttemptCount", 134 "columnName": "run_attempt_count", 135 "affinity": "INTEGER", 136 "notNull": true 137 }, 138 { 139 "fieldPath": "backoffPolicy", 140 "columnName": "backoff_policy", 141 "affinity": "INTEGER", 142 "notNull": true 143 }, 144 { 145 "fieldPath": "backoffDelayDuration", 146 "columnName": "backoff_delay_duration", 147 "affinity": "INTEGER", 148 "notNull": true 149 }, 150 { 151 "fieldPath": "periodStartTime", 152 "columnName": "period_start_time", 153 "affinity": "INTEGER", 154 "notNull": true 155 }, 156 { 157 "fieldPath": "minimumRetentionDuration", 158 "columnName": "minimum_retention_duration", 159 "affinity": "INTEGER", 160 "notNull": true 161 }, 162 { 163 "fieldPath": "scheduleRequestedAt", 164 "columnName": "schedule_requested_at", 165 "affinity": "INTEGER", 166 "notNull": true 167 }, 168 { 169 "fieldPath": "runInForeground", 170 "columnName": "run_in_foreground", 171 "affinity": "INTEGER", 172 "notNull": true 173 }, 174 { 175 "fieldPath": "constraints.mRequiredNetworkType", 176 "columnName": "required_network_type", 177 "affinity": "INTEGER", 178 "notNull": false 179 }, 180 { 181 "fieldPath": "constraints.mRequiresCharging", 182 "columnName": "requires_charging", 183 "affinity": "INTEGER", 184 "notNull": true 185 }, 186 { 187 "fieldPath": "constraints.mRequiresDeviceIdle", 188 "columnName": "requires_device_idle", 189 "affinity": "INTEGER", 190 "notNull": true 191 }, 192 { 193 "fieldPath": "constraints.mRequiresBatteryNotLow", 194 "columnName": "requires_battery_not_low", 195 "affinity": "INTEGER", 196 "notNull": true 197 }, 198 { 199 "fieldPath": "constraints.mRequiresStorageNotLow", 200 "columnName": "requires_storage_not_low", 201 "affinity": "INTEGER", 202 "notNull": true 203 }, 204 { 205 "fieldPath": "constraints.mTriggerContentUpdateDelay", 206 "columnName": "trigger_content_update_delay", 207 "affinity": "INTEGER", 208 "notNull": true 209 }, 210 { 211 "fieldPath": "constraints.mTriggerMaxContentDelay", 212 "columnName": "trigger_max_content_delay", 213 "affinity": "INTEGER", 214 "notNull": true 215 }, 216 { 217 "fieldPath": "constraints.mContentUriTriggers", 218 "columnName": "content_uri_triggers", 219 "affinity": "BLOB", 220 "notNull": false 221 } 222 ], 223 "primaryKey": { 224 "columnNames": [ 225 "id" 226 ], 227 "autoGenerate": false 228 }, 229 "indices": [ 230 { 231 "name": "index_WorkSpec_schedule_requested_at", 232 "unique": false, 233 "columnNames": [ 234 "schedule_requested_at" 235 ], 236 "createSql": "CREATE INDEX `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)" 237 }, 238 { 239 "name": "index_WorkSpec_period_start_time", 240 "unique": false, 241 "columnNames": [ 242 "period_start_time" 243 ], 244 "createSql": "CREATE INDEX `index_WorkSpec_period_start_time` ON `${TABLE_NAME}` (`period_start_time`)" 245 } 246 ], 247 "foreignKeys": [] 248 }, 249 { 250 "tableName": "WorkTag", 251 "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 )", 252 "fields": [ 253 { 254 "fieldPath": "tag", 255 "columnName": "tag", 256 "affinity": "TEXT", 257 "notNull": true 258 }, 259 { 260 "fieldPath": "workSpecId", 261 "columnName": "work_spec_id", 262 "affinity": "TEXT", 263 "notNull": true 264 } 265 ], 266 "primaryKey": { 267 "columnNames": [ 268 "tag", 269 "work_spec_id" 270 ], 271 "autoGenerate": false 272 }, 273 "indices": [ 274 { 275 "name": "index_WorkTag_work_spec_id", 276 "unique": false, 277 "columnNames": [ 278 "work_spec_id" 279 ], 280 "createSql": "CREATE INDEX `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 281 } 282 ], 283 "foreignKeys": [ 284 { 285 "table": "WorkSpec", 286 "onDelete": "CASCADE", 287 "onUpdate": "CASCADE", 288 "columns": [ 289 "work_spec_id" 290 ], 291 "referencedColumns": [ 292 "id" 293 ] 294 } 295 ] 296 }, 297 { 298 "tableName": "SystemIdInfo", 299 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )", 300 "fields": [ 301 { 302 "fieldPath": "workSpecId", 303 "columnName": "work_spec_id", 304 "affinity": "TEXT", 305 "notNull": true 306 }, 307 { 308 "fieldPath": "systemId", 309 "columnName": "system_id", 310 "affinity": "INTEGER", 311 "notNull": true 312 } 313 ], 314 "primaryKey": { 315 "columnNames": [ 316 "work_spec_id" 317 ], 318 "autoGenerate": false 319 }, 320 "indices": [], 321 "foreignKeys": [ 322 { 323 "table": "WorkSpec", 324 "onDelete": "CASCADE", 325 "onUpdate": "CASCADE", 326 "columns": [ 327 "work_spec_id" 328 ], 329 "referencedColumns": [ 330 "id" 331 ] 332 } 333 ] 334 }, 335 { 336 "tableName": "WorkName", 337 "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 )", 338 "fields": [ 339 { 340 "fieldPath": "name", 341 "columnName": "name", 342 "affinity": "TEXT", 343 "notNull": true 344 }, 345 { 346 "fieldPath": "workSpecId", 347 "columnName": "work_spec_id", 348 "affinity": "TEXT", 349 "notNull": true 350 } 351 ], 352 "primaryKey": { 353 "columnNames": [ 354 "name", 355 "work_spec_id" 356 ], 357 "autoGenerate": false 358 }, 359 "indices": [ 360 { 361 "name": "index_WorkName_work_spec_id", 362 "unique": false, 363 "columnNames": [ 364 "work_spec_id" 365 ], 366 "createSql": "CREATE INDEX `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 367 } 368 ], 369 "foreignKeys": [ 370 { 371 "table": "WorkSpec", 372 "onDelete": "CASCADE", 373 "onUpdate": "CASCADE", 374 "columns": [ 375 "work_spec_id" 376 ], 377 "referencedColumns": [ 378 "id" 379 ] 380 } 381 ] 382 }, 383 { 384 "tableName": "WorkProgress", 385 "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 )", 386 "fields": [ 387 { 388 "fieldPath": "mWorkSpecId", 389 "columnName": "work_spec_id", 390 "affinity": "TEXT", 391 "notNull": true 392 }, 393 { 394 "fieldPath": "mProgress", 395 "columnName": "progress", 396 "affinity": "BLOB", 397 "notNull": true 398 } 399 ], 400 "primaryKey": { 401 "columnNames": [ 402 "work_spec_id" 403 ], 404 "autoGenerate": false 405 }, 406 "indices": [], 407 "foreignKeys": [ 408 { 409 "table": "WorkSpec", 410 "onDelete": "CASCADE", 411 "onUpdate": "CASCADE", 412 "columns": [ 413 "work_spec_id" 414 ], 415 "referencedColumns": [ 416 "id" 417 ] 418 } 419 ] 420 } 421 ], 422 "views": [], 423 "setupQueries": [ 424 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 425 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9621c84c6c5f8cde54531f1ca95b7d2b')" 426 ] 427 } 428}