1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 8, 5 "identityHash": "7225a14239239f8dfa32f97dc7b96974", 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, `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": "constraints.mRequiredNetworkType", 170 "columnName": "required_network_type", 171 "affinity": "INTEGER", 172 "notNull": false 173 }, 174 { 175 "fieldPath": "constraints.mRequiresCharging", 176 "columnName": "requires_charging", 177 "affinity": "INTEGER", 178 "notNull": true 179 }, 180 { 181 "fieldPath": "constraints.mRequiresDeviceIdle", 182 "columnName": "requires_device_idle", 183 "affinity": "INTEGER", 184 "notNull": true 185 }, 186 { 187 "fieldPath": "constraints.mRequiresBatteryNotLow", 188 "columnName": "requires_battery_not_low", 189 "affinity": "INTEGER", 190 "notNull": true 191 }, 192 { 193 "fieldPath": "constraints.mRequiresStorageNotLow", 194 "columnName": "requires_storage_not_low", 195 "affinity": "INTEGER", 196 "notNull": true 197 }, 198 { 199 "fieldPath": "constraints.mTriggerContentUpdateDelay", 200 "columnName": "trigger_content_update_delay", 201 "affinity": "INTEGER", 202 "notNull": true 203 }, 204 { 205 "fieldPath": "constraints.mTriggerMaxContentDelay", 206 "columnName": "trigger_max_content_delay", 207 "affinity": "INTEGER", 208 "notNull": true 209 }, 210 { 211 "fieldPath": "constraints.mContentUriTriggers", 212 "columnName": "content_uri_triggers", 213 "affinity": "BLOB", 214 "notNull": false 215 } 216 ], 217 "primaryKey": { 218 "columnNames": [ 219 "id" 220 ], 221 "autoGenerate": false 222 }, 223 "indices": [ 224 { 225 "name": "index_WorkSpec_schedule_requested_at", 226 "unique": false, 227 "columnNames": [ 228 "schedule_requested_at" 229 ], 230 "createSql": "CREATE INDEX `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)" 231 }, 232 { 233 "name": "index_WorkSpec_period_start_time", 234 "unique": false, 235 "columnNames": [ 236 "period_start_time" 237 ], 238 "createSql": "CREATE INDEX `index_WorkSpec_period_start_time` ON `${TABLE_NAME}` (`period_start_time`)" 239 } 240 ], 241 "foreignKeys": [] 242 }, 243 { 244 "tableName": "WorkTag", 245 "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 )", 246 "fields": [ 247 { 248 "fieldPath": "tag", 249 "columnName": "tag", 250 "affinity": "TEXT", 251 "notNull": true 252 }, 253 { 254 "fieldPath": "workSpecId", 255 "columnName": "work_spec_id", 256 "affinity": "TEXT", 257 "notNull": true 258 } 259 ], 260 "primaryKey": { 261 "columnNames": [ 262 "tag", 263 "work_spec_id" 264 ], 265 "autoGenerate": false 266 }, 267 "indices": [ 268 { 269 "name": "index_WorkTag_work_spec_id", 270 "unique": false, 271 "columnNames": [ 272 "work_spec_id" 273 ], 274 "createSql": "CREATE INDEX `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 275 } 276 ], 277 "foreignKeys": [ 278 { 279 "table": "WorkSpec", 280 "onDelete": "CASCADE", 281 "onUpdate": "CASCADE", 282 "columns": [ 283 "work_spec_id" 284 ], 285 "referencedColumns": [ 286 "id" 287 ] 288 } 289 ] 290 }, 291 { 292 "tableName": "SystemIdInfo", 293 "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 )", 294 "fields": [ 295 { 296 "fieldPath": "workSpecId", 297 "columnName": "work_spec_id", 298 "affinity": "TEXT", 299 "notNull": true 300 }, 301 { 302 "fieldPath": "systemId", 303 "columnName": "system_id", 304 "affinity": "INTEGER", 305 "notNull": true 306 } 307 ], 308 "primaryKey": { 309 "columnNames": [ 310 "work_spec_id" 311 ], 312 "autoGenerate": false 313 }, 314 "indices": [], 315 "foreignKeys": [ 316 { 317 "table": "WorkSpec", 318 "onDelete": "CASCADE", 319 "onUpdate": "CASCADE", 320 "columns": [ 321 "work_spec_id" 322 ], 323 "referencedColumns": [ 324 "id" 325 ] 326 } 327 ] 328 }, 329 { 330 "tableName": "WorkName", 331 "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 )", 332 "fields": [ 333 { 334 "fieldPath": "name", 335 "columnName": "name", 336 "affinity": "TEXT", 337 "notNull": true 338 }, 339 { 340 "fieldPath": "workSpecId", 341 "columnName": "work_spec_id", 342 "affinity": "TEXT", 343 "notNull": true 344 } 345 ], 346 "primaryKey": { 347 "columnNames": [ 348 "name", 349 "work_spec_id" 350 ], 351 "autoGenerate": false 352 }, 353 "indices": [ 354 { 355 "name": "index_WorkName_work_spec_id", 356 "unique": false, 357 "columnNames": [ 358 "work_spec_id" 359 ], 360 "createSql": "CREATE INDEX `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 361 } 362 ], 363 "foreignKeys": [ 364 { 365 "table": "WorkSpec", 366 "onDelete": "CASCADE", 367 "onUpdate": "CASCADE", 368 "columns": [ 369 "work_spec_id" 370 ], 371 "referencedColumns": [ 372 "id" 373 ] 374 } 375 ] 376 }, 377 { 378 "tableName": "WorkProgress", 379 "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 )", 380 "fields": [ 381 { 382 "fieldPath": "mWorkSpecId", 383 "columnName": "work_spec_id", 384 "affinity": "TEXT", 385 "notNull": true 386 }, 387 { 388 "fieldPath": "mProgress", 389 "columnName": "progress", 390 "affinity": "BLOB", 391 "notNull": true 392 } 393 ], 394 "primaryKey": { 395 "columnNames": [ 396 "work_spec_id" 397 ], 398 "autoGenerate": false 399 }, 400 "indices": [], 401 "foreignKeys": [ 402 { 403 "table": "WorkSpec", 404 "onDelete": "CASCADE", 405 "onUpdate": "CASCADE", 406 "columns": [ 407 "work_spec_id" 408 ], 409 "referencedColumns": [ 410 "id" 411 ] 412 } 413 ] 414 } 415 ], 416 "views": [], 417 "setupQueries": [ 418 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 419 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7225a14239239f8dfa32f97dc7b96974')" 420 ] 421 } 422}