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