1{
2  "formatVersion": 1,
3  "database": {
4    "version": 4,
5    "identityHash": "c45e5fcbdf3824dead9778f19e2fd8af",
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, `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.mContentUriTriggers",
200            "columnName": "content_uri_triggers",
201            "affinity": "BLOB",
202            "notNull": false
203          }
204        ],
205        "primaryKey": {
206          "columnNames": [
207            "id"
208          ],
209          "autoGenerate": false
210        },
211        "indices": [
212          {
213            "name": "index_WorkSpec_schedule_requested_at",
214            "unique": false,
215            "columnNames": [
216              "schedule_requested_at"
217            ],
218            "createSql": "CREATE  INDEX `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)"
219          }
220        ],
221        "foreignKeys": []
222      },
223      {
224        "tableName": "WorkTag",
225        "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 )",
226        "fields": [
227          {
228            "fieldPath": "tag",
229            "columnName": "tag",
230            "affinity": "TEXT",
231            "notNull": true
232          },
233          {
234            "fieldPath": "workSpecId",
235            "columnName": "work_spec_id",
236            "affinity": "TEXT",
237            "notNull": true
238          }
239        ],
240        "primaryKey": {
241          "columnNames": [
242            "tag",
243            "work_spec_id"
244          ],
245          "autoGenerate": false
246        },
247        "indices": [
248          {
249            "name": "index_WorkTag_work_spec_id",
250            "unique": false,
251            "columnNames": [
252              "work_spec_id"
253            ],
254            "createSql": "CREATE  INDEX `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
255          }
256        ],
257        "foreignKeys": [
258          {
259            "table": "WorkSpec",
260            "onDelete": "CASCADE",
261            "onUpdate": "CASCADE",
262            "columns": [
263              "work_spec_id"
264            ],
265            "referencedColumns": [
266              "id"
267            ]
268          }
269        ]
270      },
271      {
272        "tableName": "SystemIdInfo",
273        "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 )",
274        "fields": [
275          {
276            "fieldPath": "workSpecId",
277            "columnName": "work_spec_id",
278            "affinity": "TEXT",
279            "notNull": true
280          },
281          {
282            "fieldPath": "systemId",
283            "columnName": "system_id",
284            "affinity": "INTEGER",
285            "notNull": true
286          }
287        ],
288        "primaryKey": {
289          "columnNames": [
290            "work_spec_id"
291          ],
292          "autoGenerate": false
293        },
294        "indices": [],
295        "foreignKeys": [
296          {
297            "table": "WorkSpec",
298            "onDelete": "CASCADE",
299            "onUpdate": "CASCADE",
300            "columns": [
301              "work_spec_id"
302            ],
303            "referencedColumns": [
304              "id"
305            ]
306          }
307        ]
308      },
309      {
310        "tableName": "WorkName",
311        "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 )",
312        "fields": [
313          {
314            "fieldPath": "name",
315            "columnName": "name",
316            "affinity": "TEXT",
317            "notNull": true
318          },
319          {
320            "fieldPath": "workSpecId",
321            "columnName": "work_spec_id",
322            "affinity": "TEXT",
323            "notNull": true
324          }
325        ],
326        "primaryKey": {
327          "columnNames": [
328            "name",
329            "work_spec_id"
330          ],
331          "autoGenerate": false
332        },
333        "indices": [
334          {
335            "name": "index_WorkName_work_spec_id",
336            "unique": false,
337            "columnNames": [
338              "work_spec_id"
339            ],
340            "createSql": "CREATE  INDEX `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
341          }
342        ],
343        "foreignKeys": [
344          {
345            "table": "WorkSpec",
346            "onDelete": "CASCADE",
347            "onUpdate": "CASCADE",
348            "columns": [
349              "work_spec_id"
350            ],
351            "referencedColumns": [
352              "id"
353            ]
354          }
355        ]
356      }
357    ],
358    "setupQueries": [
359      "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
360      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"c45e5fcbdf3824dead9778f19e2fd8af\")"
361    ]
362  }
363}