1{
2  "formatVersion": 1,
3  "database": {
4    "version": 10,
5    "identityHash": "31dd21ebb478946b3d4dde78b2bccf6f",
6    "entities": [
7      {
8        "tableName": "updates",
9        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`launch_asset_id` INTEGER, `manifest` TEXT, `status` INTEGER NOT NULL, `keep` INTEGER NOT NULL, `last_accessed` INTEGER NOT NULL, `successful_launch_count` INTEGER NOT NULL DEFAULT 0, `failed_launch_count` INTEGER NOT NULL DEFAULT 0, `id` BLOB NOT NULL, `commit_time` INTEGER NOT NULL, `runtime_version` TEXT NOT NULL, `scope_key` TEXT NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`launch_asset_id`) REFERENCES `assets`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
10        "fields": [
11          {
12            "fieldPath": "launchAssetId",
13            "columnName": "launch_asset_id",
14            "affinity": "INTEGER",
15            "notNull": false
16          },
17          {
18            "fieldPath": "manifest",
19            "columnName": "manifest",
20            "affinity": "TEXT",
21            "notNull": false
22          },
23          {
24            "fieldPath": "status",
25            "columnName": "status",
26            "affinity": "INTEGER",
27            "notNull": true
28          },
29          {
30            "fieldPath": "keep",
31            "columnName": "keep",
32            "affinity": "INTEGER",
33            "notNull": true
34          },
35          {
36            "fieldPath": "lastAccessed",
37            "columnName": "last_accessed",
38            "affinity": "INTEGER",
39            "notNull": true
40          },
41          {
42            "fieldPath": "successfulLaunchCount",
43            "columnName": "successful_launch_count",
44            "affinity": "INTEGER",
45            "notNull": true,
46            "defaultValue": "0"
47          },
48          {
49            "fieldPath": "failedLaunchCount",
50            "columnName": "failed_launch_count",
51            "affinity": "INTEGER",
52            "notNull": true,
53            "defaultValue": "0"
54          },
55          {
56            "fieldPath": "id",
57            "columnName": "id",
58            "affinity": "BLOB",
59            "notNull": true
60          },
61          {
62            "fieldPath": "commitTime",
63            "columnName": "commit_time",
64            "affinity": "INTEGER",
65            "notNull": true
66          },
67          {
68            "fieldPath": "runtimeVersion",
69            "columnName": "runtime_version",
70            "affinity": "TEXT",
71            "notNull": true
72          },
73          {
74            "fieldPath": "scopeKey",
75            "columnName": "scope_key",
76            "affinity": "TEXT",
77            "notNull": true
78          }
79        ],
80        "primaryKey": {
81          "columnNames": [
82            "id"
83          ],
84          "autoGenerate": false
85        },
86        "indices": [
87          {
88            "name": "index_updates_launch_asset_id",
89            "unique": false,
90            "columnNames": [
91              "launch_asset_id"
92            ],
93            "createSql": "CREATE INDEX IF NOT EXISTS `index_updates_launch_asset_id` ON `${TABLE_NAME}` (`launch_asset_id`)"
94          },
95          {
96            "name": "index_updates_scope_key_commit_time",
97            "unique": true,
98            "columnNames": [
99              "scope_key",
100              "commit_time"
101            ],
102            "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_updates_scope_key_commit_time` ON `${TABLE_NAME}` (`scope_key`, `commit_time`)"
103          }
104        ],
105        "foreignKeys": [
106          {
107            "table": "assets",
108            "onDelete": "CASCADE",
109            "onUpdate": "NO ACTION",
110            "columns": [
111              "launch_asset_id"
112            ],
113            "referencedColumns": [
114              "id"
115            ]
116          }
117        ]
118      },
119      {
120        "tableName": "updates_assets",
121        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`update_id` BLOB NOT NULL, `asset_id` INTEGER NOT NULL, PRIMARY KEY(`update_id`, `asset_id`), FOREIGN KEY(`update_id`) REFERENCES `updates`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`asset_id`) REFERENCES `assets`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
122        "fields": [
123          {
124            "fieldPath": "updateId",
125            "columnName": "update_id",
126            "affinity": "BLOB",
127            "notNull": true
128          },
129          {
130            "fieldPath": "assetId",
131            "columnName": "asset_id",
132            "affinity": "INTEGER",
133            "notNull": true
134          }
135        ],
136        "primaryKey": {
137          "columnNames": [
138            "update_id",
139            "asset_id"
140          ],
141          "autoGenerate": false
142        },
143        "indices": [
144          {
145            "name": "index_updates_assets_asset_id",
146            "unique": false,
147            "columnNames": [
148              "asset_id"
149            ],
150            "createSql": "CREATE INDEX IF NOT EXISTS `index_updates_assets_asset_id` ON `${TABLE_NAME}` (`asset_id`)"
151          }
152        ],
153        "foreignKeys": [
154          {
155            "table": "updates",
156            "onDelete": "CASCADE",
157            "onUpdate": "NO ACTION",
158            "columns": [
159              "update_id"
160            ],
161            "referencedColumns": [
162              "id"
163            ]
164          },
165          {
166            "table": "assets",
167            "onDelete": "CASCADE",
168            "onUpdate": "NO ACTION",
169            "columns": [
170              "asset_id"
171            ],
172            "referencedColumns": [
173              "id"
174            ]
175          }
176        ]
177      },
178      {
179        "tableName": "assets",
180        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `url` TEXT, `headers` TEXT, `extra_request_headers` TEXT, `metadata` TEXT, `download_time` INTEGER, `relative_path` TEXT, `hash` BLOB, `hash_type` INTEGER NOT NULL, `expected_hash` TEXT, `marked_for_deletion` INTEGER NOT NULL, `key` TEXT, `type` TEXT)",
181        "fields": [
182          {
183            "fieldPath": "id",
184            "columnName": "id",
185            "affinity": "INTEGER",
186            "notNull": true
187          },
188          {
189            "fieldPath": "url",
190            "columnName": "url",
191            "affinity": "TEXT",
192            "notNull": false
193          },
194          {
195            "fieldPath": "headers",
196            "columnName": "headers",
197            "affinity": "TEXT",
198            "notNull": false
199          },
200          {
201            "fieldPath": "extraRequestHeaders",
202            "columnName": "extra_request_headers",
203            "affinity": "TEXT",
204            "notNull": false
205          },
206          {
207            "fieldPath": "metadata",
208            "columnName": "metadata",
209            "affinity": "TEXT",
210            "notNull": false
211          },
212          {
213            "fieldPath": "downloadTime",
214            "columnName": "download_time",
215            "affinity": "INTEGER",
216            "notNull": false
217          },
218          {
219            "fieldPath": "relativePath",
220            "columnName": "relative_path",
221            "affinity": "TEXT",
222            "notNull": false
223          },
224          {
225            "fieldPath": "hash",
226            "columnName": "hash",
227            "affinity": "BLOB",
228            "notNull": false
229          },
230          {
231            "fieldPath": "hashType",
232            "columnName": "hash_type",
233            "affinity": "INTEGER",
234            "notNull": true
235          },
236          {
237            "fieldPath": "expectedHash",
238            "columnName": "expected_hash",
239            "affinity": "TEXT",
240            "notNull": false
241          },
242          {
243            "fieldPath": "markedForDeletion",
244            "columnName": "marked_for_deletion",
245            "affinity": "INTEGER",
246            "notNull": true
247          },
248          {
249            "fieldPath": "key",
250            "columnName": "key",
251            "affinity": "TEXT",
252            "notNull": false
253          },
254          {
255            "fieldPath": "type",
256            "columnName": "type",
257            "affinity": "TEXT",
258            "notNull": false
259          }
260        ],
261        "primaryKey": {
262          "columnNames": [
263            "id"
264          ],
265          "autoGenerate": true
266        },
267        "indices": [
268          {
269            "name": "index_assets_key",
270            "unique": true,
271            "columnNames": [
272              "key"
273            ],
274            "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_assets_key` ON `${TABLE_NAME}` (`key`)"
275          }
276        ],
277        "foreignKeys": []
278      },
279      {
280        "tableName": "json_data",
281        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `key` TEXT NOT NULL, `value` TEXT NOT NULL, `last_updated` INTEGER NOT NULL, `scope_key` TEXT NOT NULL)",
282        "fields": [
283          {
284            "fieldPath": "id",
285            "columnName": "id",
286            "affinity": "INTEGER",
287            "notNull": true
288          },
289          {
290            "fieldPath": "key",
291            "columnName": "key",
292            "affinity": "TEXT",
293            "notNull": true
294          },
295          {
296            "fieldPath": "value",
297            "columnName": "value",
298            "affinity": "TEXT",
299            "notNull": true
300          },
301          {
302            "fieldPath": "lastUpdated",
303            "columnName": "last_updated",
304            "affinity": "INTEGER",
305            "notNull": true
306          },
307          {
308            "fieldPath": "scopeKey",
309            "columnName": "scope_key",
310            "affinity": "TEXT",
311            "notNull": true
312          }
313        ],
314        "primaryKey": {
315          "columnNames": [
316            "id"
317          ],
318          "autoGenerate": true
319        },
320        "indices": [
321          {
322            "name": "index_json_data_scope_key",
323            "unique": false,
324            "columnNames": [
325              "scope_key"
326            ],
327            "createSql": "CREATE INDEX IF NOT EXISTS `index_json_data_scope_key` ON `${TABLE_NAME}` (`scope_key`)"
328          }
329        ],
330        "foreignKeys": []
331      }
332    ],
333    "views": [],
334    "setupQueries": [
335      "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
336      "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '31dd21ebb478946b3d4dde78b2bccf6f')"
337    ]
338  }
339}