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