1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 5, 5 "identityHash": "c84d23ade98552f1cec71088c1f0794c", 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 "foreignKeys": [] 234 }, 235 { 236 "tableName": "WorkTag", 237 "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 )", 238 "fields": [ 239 { 240 "fieldPath": "tag", 241 "columnName": "tag", 242 "affinity": "TEXT", 243 "notNull": true 244 }, 245 { 246 "fieldPath": "workSpecId", 247 "columnName": "work_spec_id", 248 "affinity": "TEXT", 249 "notNull": true 250 } 251 ], 252 "primaryKey": { 253 "columnNames": [ 254 "tag", 255 "work_spec_id" 256 ], 257 "autoGenerate": false 258 }, 259 "indices": [ 260 { 261 "name": "index_WorkTag_work_spec_id", 262 "unique": false, 263 "columnNames": [ 264 "work_spec_id" 265 ], 266 "createSql": "CREATE INDEX `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 267 } 268 ], 269 "foreignKeys": [ 270 { 271 "table": "WorkSpec", 272 "onDelete": "CASCADE", 273 "onUpdate": "CASCADE", 274 "columns": [ 275 "work_spec_id" 276 ], 277 "referencedColumns": [ 278 "id" 279 ] 280 } 281 ] 282 }, 283 { 284 "tableName": "SystemIdInfo", 285 "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 )", 286 "fields": [ 287 { 288 "fieldPath": "workSpecId", 289 "columnName": "work_spec_id", 290 "affinity": "TEXT", 291 "notNull": true 292 }, 293 { 294 "fieldPath": "systemId", 295 "columnName": "system_id", 296 "affinity": "INTEGER", 297 "notNull": true 298 } 299 ], 300 "primaryKey": { 301 "columnNames": [ 302 "work_spec_id" 303 ], 304 "autoGenerate": false 305 }, 306 "indices": [], 307 "foreignKeys": [ 308 { 309 "table": "WorkSpec", 310 "onDelete": "CASCADE", 311 "onUpdate": "CASCADE", 312 "columns": [ 313 "work_spec_id" 314 ], 315 "referencedColumns": [ 316 "id" 317 ] 318 } 319 ] 320 }, 321 { 322 "tableName": "WorkName", 323 "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 )", 324 "fields": [ 325 { 326 "fieldPath": "name", 327 "columnName": "name", 328 "affinity": "TEXT", 329 "notNull": true 330 }, 331 { 332 "fieldPath": "workSpecId", 333 "columnName": "work_spec_id", 334 "affinity": "TEXT", 335 "notNull": true 336 } 337 ], 338 "primaryKey": { 339 "columnNames": [ 340 "name", 341 "work_spec_id" 342 ], 343 "autoGenerate": false 344 }, 345 "indices": [ 346 { 347 "name": "index_WorkName_work_spec_id", 348 "unique": false, 349 "columnNames": [ 350 "work_spec_id" 351 ], 352 "createSql": "CREATE INDEX `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)" 353 } 354 ], 355 "foreignKeys": [ 356 { 357 "table": "WorkSpec", 358 "onDelete": "CASCADE", 359 "onUpdate": "CASCADE", 360 "columns": [ 361 "work_spec_id" 362 ], 363 "referencedColumns": [ 364 "id" 365 ] 366 } 367 ] 368 } 369 ], 370 "setupQueries": [ 371 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 372 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"c84d23ade98552f1cec71088c1f0794c\")" 373 ] 374 } 375}