Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit ffa4e89

Browse files
authored
Submissions in journal (EXPOSUREAPP-14181) (#5693)
* Sever / API * Lint * Srs Device attestation * Set steps * Test / Run * Lint * lint * Logs * Auth response / error codes * Submission error codes * Split * Revert Jackson converter * Refactor attestation * Map safety net errors * Test * Tests * otp flow * Test Result * Log * Update title * Save last submission time * Update SubmissionTaskTest.kt * Update SrsSubmissionSettingsTest.kt * Add test * Update SrsSubmissionRepositoryTest.kt * Device time * Display submission time * Extend test menu * Cover reset * Fix * Check error code first * Create SrsPlaybookTest.kt * Cover OTP error * Lint * Create SrsSubmissionServerTest.kt * Update SrsSubmissionServerTest.kt * add new options * Extend journal * Report submission * lint * Logs * Clean * style * Clean obsolete submissions in the diary * Update ContactDiaryDataRetentionCalculationTest.kt * Reusable * Create SubmissionReporterTest.kt * Update ContactDiaryOverviewViewModelTest.kt * Screenshots Test * Update SrsSubmissionRepositoryTest.kt * DB test * Update SrsSubmissionRepositoryTest.kt * Update ContactDiaryOverviewFragmentTest.kt
1 parent c07bafe commit ffa4e89

30 files changed

+772
-42
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 5,
5+
"identityHash": "205d70ce8edf69871f63fa3d2fe98ca6",
6+
"entities": [
7+
{
8+
"tableName": "locations",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`locationId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `locationName` TEXT NOT NULL, `phoneNumber` TEXT, `emailAddress` TEXT, `traceLocationID` TEXT)",
10+
"fields": [
11+
{
12+
"fieldPath": "locationId",
13+
"columnName": "locationId",
14+
"affinity": "INTEGER",
15+
"notNull": true
16+
},
17+
{
18+
"fieldPath": "locationName",
19+
"columnName": "locationName",
20+
"affinity": "TEXT",
21+
"notNull": true
22+
},
23+
{
24+
"fieldPath": "phoneNumber",
25+
"columnName": "phoneNumber",
26+
"affinity": "TEXT",
27+
"notNull": false
28+
},
29+
{
30+
"fieldPath": "emailAddress",
31+
"columnName": "emailAddress",
32+
"affinity": "TEXT",
33+
"notNull": false
34+
},
35+
{
36+
"fieldPath": "traceLocationID",
37+
"columnName": "traceLocationID",
38+
"affinity": "TEXT",
39+
"notNull": false
40+
}
41+
],
42+
"primaryKey": {
43+
"columnNames": [
44+
"locationId"
45+
],
46+
"autoGenerate": true
47+
},
48+
"indices": [],
49+
"foreignKeys": []
50+
},
51+
{
52+
"tableName": "locationvisits",
53+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` TEXT NOT NULL, `fkLocationId` INTEGER NOT NULL, `duration` INTEGER, `circumstances` TEXT, `checkInID` INTEGER, FOREIGN KEY(`fkLocationId`) REFERENCES `locations`(`locationId`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)",
54+
"fields": [
55+
{
56+
"fieldPath": "id",
57+
"columnName": "id",
58+
"affinity": "INTEGER",
59+
"notNull": true
60+
},
61+
{
62+
"fieldPath": "date",
63+
"columnName": "date",
64+
"affinity": "TEXT",
65+
"notNull": true
66+
},
67+
{
68+
"fieldPath": "fkLocationId",
69+
"columnName": "fkLocationId",
70+
"affinity": "INTEGER",
71+
"notNull": true
72+
},
73+
{
74+
"fieldPath": "duration",
75+
"columnName": "duration",
76+
"affinity": "INTEGER",
77+
"notNull": false
78+
},
79+
{
80+
"fieldPath": "circumstances",
81+
"columnName": "circumstances",
82+
"affinity": "TEXT",
83+
"notNull": false
84+
},
85+
{
86+
"fieldPath": "checkInID",
87+
"columnName": "checkInID",
88+
"affinity": "INTEGER",
89+
"notNull": false
90+
}
91+
],
92+
"primaryKey": {
93+
"columnNames": [
94+
"id"
95+
],
96+
"autoGenerate": true
97+
},
98+
"indices": [
99+
{
100+
"name": "index_locationvisits_fkLocationId",
101+
"unique": false,
102+
"columnNames": [
103+
"fkLocationId"
104+
],
105+
"orders": [],
106+
"createSql": "CREATE INDEX IF NOT EXISTS `index_locationvisits_fkLocationId` ON `${TABLE_NAME}` (`fkLocationId`)"
107+
}
108+
],
109+
"foreignKeys": [
110+
{
111+
"table": "locations",
112+
"onDelete": "CASCADE",
113+
"onUpdate": "CASCADE",
114+
"columns": [
115+
"fkLocationId"
116+
],
117+
"referencedColumns": [
118+
"locationId"
119+
]
120+
}
121+
]
122+
},
123+
{
124+
"tableName": "persons",
125+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`personId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `fullName` TEXT NOT NULL, `phoneNumber` TEXT, `emailAddress` TEXT)",
126+
"fields": [
127+
{
128+
"fieldPath": "personId",
129+
"columnName": "personId",
130+
"affinity": "INTEGER",
131+
"notNull": true
132+
},
133+
{
134+
"fieldPath": "fullName",
135+
"columnName": "fullName",
136+
"affinity": "TEXT",
137+
"notNull": true
138+
},
139+
{
140+
"fieldPath": "phoneNumber",
141+
"columnName": "phoneNumber",
142+
"affinity": "TEXT",
143+
"notNull": false
144+
},
145+
{
146+
"fieldPath": "emailAddress",
147+
"columnName": "emailAddress",
148+
"affinity": "TEXT",
149+
"notNull": false
150+
}
151+
],
152+
"primaryKey": {
153+
"columnNames": [
154+
"personId"
155+
],
156+
"autoGenerate": true
157+
},
158+
"indices": [],
159+
"foreignKeys": []
160+
},
161+
{
162+
"tableName": "personencounters",
163+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` TEXT NOT NULL, `fkPersonId` INTEGER NOT NULL, `durationClassification` TEXT, `withMask` INTEGER, `wasOutside` INTEGER, `circumstances` TEXT, FOREIGN KEY(`fkPersonId`) REFERENCES `persons`(`personId`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)",
164+
"fields": [
165+
{
166+
"fieldPath": "id",
167+
"columnName": "id",
168+
"affinity": "INTEGER",
169+
"notNull": true
170+
},
171+
{
172+
"fieldPath": "date",
173+
"columnName": "date",
174+
"affinity": "TEXT",
175+
"notNull": true
176+
},
177+
{
178+
"fieldPath": "fkPersonId",
179+
"columnName": "fkPersonId",
180+
"affinity": "INTEGER",
181+
"notNull": true
182+
},
183+
{
184+
"fieldPath": "durationClassification",
185+
"columnName": "durationClassification",
186+
"affinity": "TEXT",
187+
"notNull": false
188+
},
189+
{
190+
"fieldPath": "withMask",
191+
"columnName": "withMask",
192+
"affinity": "INTEGER",
193+
"notNull": false
194+
},
195+
{
196+
"fieldPath": "wasOutside",
197+
"columnName": "wasOutside",
198+
"affinity": "INTEGER",
199+
"notNull": false
200+
},
201+
{
202+
"fieldPath": "circumstances",
203+
"columnName": "circumstances",
204+
"affinity": "TEXT",
205+
"notNull": false
206+
}
207+
],
208+
"primaryKey": {
209+
"columnNames": [
210+
"id"
211+
],
212+
"autoGenerate": true
213+
},
214+
"indices": [
215+
{
216+
"name": "index_personencounters_fkPersonId",
217+
"unique": false,
218+
"columnNames": [
219+
"fkPersonId"
220+
],
221+
"orders": [],
222+
"createSql": "CREATE INDEX IF NOT EXISTS `index_personencounters_fkPersonId` ON `${TABLE_NAME}` (`fkPersonId`)"
223+
}
224+
],
225+
"foreignKeys": [
226+
{
227+
"table": "persons",
228+
"onDelete": "CASCADE",
229+
"onUpdate": "CASCADE",
230+
"columns": [
231+
"fkPersonId"
232+
],
233+
"referencedColumns": [
234+
"personId"
235+
]
236+
}
237+
]
238+
},
239+
{
240+
"tableName": "corona_tests",
241+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `testType` TEXT NOT NULL, `result` TEXT NOT NULL, `time` TEXT NOT NULL, PRIMARY KEY(`id`))",
242+
"fields": [
243+
{
244+
"fieldPath": "id",
245+
"columnName": "id",
246+
"affinity": "TEXT",
247+
"notNull": true
248+
},
249+
{
250+
"fieldPath": "testType",
251+
"columnName": "testType",
252+
"affinity": "TEXT",
253+
"notNull": true
254+
},
255+
{
256+
"fieldPath": "result",
257+
"columnName": "result",
258+
"affinity": "TEXT",
259+
"notNull": true
260+
},
261+
{
262+
"fieldPath": "time",
263+
"columnName": "time",
264+
"affinity": "TEXT",
265+
"notNull": true
266+
}
267+
],
268+
"primaryKey": {
269+
"columnNames": [
270+
"id"
271+
],
272+
"autoGenerate": false
273+
},
274+
"indices": [],
275+
"foreignKeys": []
276+
},
277+
{
278+
"tableName": "submissions",
279+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `submittedAt` TEXT NOT NULL)",
280+
"fields": [
281+
{
282+
"fieldPath": "id",
283+
"columnName": "id",
284+
"affinity": "INTEGER",
285+
"notNull": true
286+
},
287+
{
288+
"fieldPath": "submittedAt",
289+
"columnName": "submittedAt",
290+
"affinity": "TEXT",
291+
"notNull": true
292+
}
293+
],
294+
"primaryKey": {
295+
"columnNames": [
296+
"id"
297+
],
298+
"autoGenerate": true
299+
},
300+
"indices": [],
301+
"foreignKeys": []
302+
}
303+
],
304+
"views": [],
305+
"setupQueries": [
306+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
307+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '205d70ce8edf69871f63fa3d2fe98ca6')"
308+
]
309+
}
310+
}

0 commit comments

Comments
 (0)