]> git.ktnx.net Git - mobile-ledger.git/blob - app/schemas/net.ktnx.mobileledger.db.DB/58.json
describe description_history to Room
[mobile-ledger.git] / app / schemas / net.ktnx.mobileledger.db.DB / 58.json
1 {
2   "formatVersion": 1,
3   "database": {
4     "version": 58,
5     "identityHash": "00d9b541473347c65a90e47ce9072436",
6     "entities": [
7       {
8         "tableName": "templates",
9         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `regular_expression` TEXT NOT NULL, `test_text` TEXT, `transaction_description` TEXT, `transaction_description_match_group` INTEGER, `transaction_comment` TEXT, `transaction_comment_match_group` INTEGER, `date_year` INTEGER, `date_year_match_group` INTEGER, `date_month` INTEGER, `date_month_match_group` INTEGER, `date_day` INTEGER, `date_day_match_group` INTEGER, `is_fallback` INTEGER NOT NULL)",
10         "fields": [
11           {
12             "fieldPath": "id",
13             "columnName": "id",
14             "affinity": "INTEGER",
15             "notNull": true
16           },
17           {
18             "fieldPath": "name",
19             "columnName": "name",
20             "affinity": "TEXT",
21             "notNull": true
22           },
23           {
24             "fieldPath": "regularExpression",
25             "columnName": "regular_expression",
26             "affinity": "TEXT",
27             "notNull": true
28           },
29           {
30             "fieldPath": "testText",
31             "columnName": "test_text",
32             "affinity": "TEXT",
33             "notNull": false
34           },
35           {
36             "fieldPath": "transactionDescription",
37             "columnName": "transaction_description",
38             "affinity": "TEXT",
39             "notNull": false
40           },
41           {
42             "fieldPath": "transactionDescriptionMatchGroup",
43             "columnName": "transaction_description_match_group",
44             "affinity": "INTEGER",
45             "notNull": false
46           },
47           {
48             "fieldPath": "transactionComment",
49             "columnName": "transaction_comment",
50             "affinity": "TEXT",
51             "notNull": false
52           },
53           {
54             "fieldPath": "transactionCommentMatchGroup",
55             "columnName": "transaction_comment_match_group",
56             "affinity": "INTEGER",
57             "notNull": false
58           },
59           {
60             "fieldPath": "dateYear",
61             "columnName": "date_year",
62             "affinity": "INTEGER",
63             "notNull": false
64           },
65           {
66             "fieldPath": "dateYearMatchGroup",
67             "columnName": "date_year_match_group",
68             "affinity": "INTEGER",
69             "notNull": false
70           },
71           {
72             "fieldPath": "dateMonth",
73             "columnName": "date_month",
74             "affinity": "INTEGER",
75             "notNull": false
76           },
77           {
78             "fieldPath": "dateMonthMatchGroup",
79             "columnName": "date_month_match_group",
80             "affinity": "INTEGER",
81             "notNull": false
82           },
83           {
84             "fieldPath": "dateDay",
85             "columnName": "date_day",
86             "affinity": "INTEGER",
87             "notNull": false
88           },
89           {
90             "fieldPath": "dateDayMatchGroup",
91             "columnName": "date_day_match_group",
92             "affinity": "INTEGER",
93             "notNull": false
94           },
95           {
96             "fieldPath": "isFallback",
97             "columnName": "is_fallback",
98             "affinity": "INTEGER",
99             "notNull": true
100           }
101         ],
102         "primaryKey": {
103           "columnNames": [
104             "id"
105           ],
106           "autoGenerate": true
107         },
108         "indices": [],
109         "foreignKeys": []
110       },
111       {
112         "tableName": "template_accounts",
113         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `template_id` INTEGER NOT NULL, `acc` TEXT, `position` INTEGER NOT NULL, `acc_match_group` INTEGER, `currency` INTEGER, `currency_match_group` INTEGER, `amount` REAL, `amount_match_group` INTEGER, `comment` TEXT, `comment_match_group` INTEGER, `negate_amount` INTEGER, FOREIGN KEY(`template_id`) REFERENCES `templates`(`id`) ON UPDATE RESTRICT ON DELETE CASCADE , FOREIGN KEY(`currency`) REFERENCES `currencies`(`id`) ON UPDATE RESTRICT ON DELETE RESTRICT )",
114         "fields": [
115           {
116             "fieldPath": "id",
117             "columnName": "id",
118             "affinity": "INTEGER",
119             "notNull": true
120           },
121           {
122             "fieldPath": "templateId",
123             "columnName": "template_id",
124             "affinity": "INTEGER",
125             "notNull": true
126           },
127           {
128             "fieldPath": "accountName",
129             "columnName": "acc",
130             "affinity": "TEXT",
131             "notNull": false
132           },
133           {
134             "fieldPath": "position",
135             "columnName": "position",
136             "affinity": "INTEGER",
137             "notNull": true
138           },
139           {
140             "fieldPath": "accountNameMatchGroup",
141             "columnName": "acc_match_group",
142             "affinity": "INTEGER",
143             "notNull": false
144           },
145           {
146             "fieldPath": "currency",
147             "columnName": "currency",
148             "affinity": "INTEGER",
149             "notNull": false
150           },
151           {
152             "fieldPath": "currencyMatchGroup",
153             "columnName": "currency_match_group",
154             "affinity": "INTEGER",
155             "notNull": false
156           },
157           {
158             "fieldPath": "amount",
159             "columnName": "amount",
160             "affinity": "REAL",
161             "notNull": false
162           },
163           {
164             "fieldPath": "amountMatchGroup",
165             "columnName": "amount_match_group",
166             "affinity": "INTEGER",
167             "notNull": false
168           },
169           {
170             "fieldPath": "accountComment",
171             "columnName": "comment",
172             "affinity": "TEXT",
173             "notNull": false
174           },
175           {
176             "fieldPath": "accountCommentMatchGroup",
177             "columnName": "comment_match_group",
178             "affinity": "INTEGER",
179             "notNull": false
180           },
181           {
182             "fieldPath": "negateAmount",
183             "columnName": "negate_amount",
184             "affinity": "INTEGER",
185             "notNull": false
186           }
187         ],
188         "primaryKey": {
189           "columnNames": [
190             "id"
191           ],
192           "autoGenerate": true
193         },
194         "indices": [
195           {
196             "name": "fk_template_accounts_template",
197             "unique": false,
198             "columnNames": [
199               "template_id"
200             ],
201             "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_template` ON `${TABLE_NAME}` (`template_id`)"
202           },
203           {
204             "name": "fk_template_accounts_currency",
205             "unique": false,
206             "columnNames": [
207               "currency"
208             ],
209             "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_currency` ON `${TABLE_NAME}` (`currency`)"
210           }
211         ],
212         "foreignKeys": [
213           {
214             "table": "templates",
215             "onDelete": "CASCADE",
216             "onUpdate": "RESTRICT",
217             "columns": [
218               "template_id"
219             ],
220             "referencedColumns": [
221               "id"
222             ]
223           },
224           {
225             "table": "currencies",
226             "onDelete": "RESTRICT",
227             "onUpdate": "RESTRICT",
228             "columns": [
229               "currency"
230             ],
231             "referencedColumns": [
232               "id"
233             ]
234           }
235         ]
236       },
237       {
238         "tableName": "currencies",
239         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `position` TEXT NOT NULL, `has_gap` INTEGER NOT NULL)",
240         "fields": [
241           {
242             "fieldPath": "id",
243             "columnName": "id",
244             "affinity": "INTEGER",
245             "notNull": true
246           },
247           {
248             "fieldPath": "name",
249             "columnName": "name",
250             "affinity": "TEXT",
251             "notNull": true
252           },
253           {
254             "fieldPath": "position",
255             "columnName": "position",
256             "affinity": "TEXT",
257             "notNull": true
258           },
259           {
260             "fieldPath": "hasGap",
261             "columnName": "has_gap",
262             "affinity": "INTEGER",
263             "notNull": true
264           }
265         ],
266         "primaryKey": {
267           "columnNames": [
268             "id"
269           ],
270           "autoGenerate": true
271         },
272         "indices": [],
273         "foreignKeys": []
274       },
275       {
276         "tableName": "accounts",
277         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`level` INTEGER NOT NULL, `profile` TEXT NOT NULL, `name` TEXT NOT NULL, `name_upper` TEXT NOT NULL, `parent_name` TEXT, `expanded` INTEGER NOT NULL DEFAULT 1, `amounts_expanded` INTEGER NOT NULL DEFAULT 0, `generation` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`profile`, `name`))",
278         "fields": [
279           {
280             "fieldPath": "level",
281             "columnName": "level",
282             "affinity": "INTEGER",
283             "notNull": true
284           },
285           {
286             "fieldPath": "profile",
287             "columnName": "profile",
288             "affinity": "TEXT",
289             "notNull": true
290           },
291           {
292             "fieldPath": "name",
293             "columnName": "name",
294             "affinity": "TEXT",
295             "notNull": true
296           },
297           {
298             "fieldPath": "nameUpper",
299             "columnName": "name_upper",
300             "affinity": "TEXT",
301             "notNull": true
302           },
303           {
304             "fieldPath": "parentName",
305             "columnName": "parent_name",
306             "affinity": "TEXT",
307             "notNull": false
308           },
309           {
310             "fieldPath": "expanded",
311             "columnName": "expanded",
312             "affinity": "INTEGER",
313             "notNull": true,
314             "defaultValue": "1"
315           },
316           {
317             "fieldPath": "amountsExpanded",
318             "columnName": "amounts_expanded",
319             "affinity": "INTEGER",
320             "notNull": true,
321             "defaultValue": "0"
322           },
323           {
324             "fieldPath": "generation",
325             "columnName": "generation",
326             "affinity": "INTEGER",
327             "notNull": true,
328             "defaultValue": "0"
329           }
330         ],
331         "primaryKey": {
332           "columnNames": [
333             "profile",
334             "name"
335           ],
336           "autoGenerate": false
337         },
338         "indices": [],
339         "foreignKeys": []
340       },
341       {
342         "tableName": "profiles",
343         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `name` TEXT NOT NULL, `url` TEXT NOT NULL, `use_authentication` INTEGER NOT NULL, `auth_user` TEXT, `auth_password` TEXT, `order_no` INTEGER NOT NULL, `permit_posting` INTEGER NOT NULL, `theme` INTEGER NOT NULL DEFAULT -1, `preferred_accounts_filter` TEXT, `future_dates` INTEGER NOT NULL, `api_version` INTEGER NOT NULL, `show_commodity_by_default` INTEGER NOT NULL, `default_commodity` TEXT, `show_comments_by_default` INTEGER NOT NULL DEFAULT 1, `detected_version_pre_1_19` INTEGER NOT NULL, `detected_version_major` INTEGER NOT NULL, `detected_version_minor` INTEGER NOT NULL, PRIMARY KEY(`uuid`))",
344         "fields": [
345           {
346             "fieldPath": "uuid",
347             "columnName": "uuid",
348             "affinity": "TEXT",
349             "notNull": true
350           },
351           {
352             "fieldPath": "name",
353             "columnName": "name",
354             "affinity": "TEXT",
355             "notNull": true
356           },
357           {
358             "fieldPath": "url",
359             "columnName": "url",
360             "affinity": "TEXT",
361             "notNull": true
362           },
363           {
364             "fieldPath": "useAuthentication",
365             "columnName": "use_authentication",
366             "affinity": "INTEGER",
367             "notNull": true
368           },
369           {
370             "fieldPath": "authUser",
371             "columnName": "auth_user",
372             "affinity": "TEXT",
373             "notNull": false
374           },
375           {
376             "fieldPath": "authPassword",
377             "columnName": "auth_password",
378             "affinity": "TEXT",
379             "notNull": false
380           },
381           {
382             "fieldPath": "orderNo",
383             "columnName": "order_no",
384             "affinity": "INTEGER",
385             "notNull": true
386           },
387           {
388             "fieldPath": "permitPosting",
389             "columnName": "permit_posting",
390             "affinity": "INTEGER",
391             "notNull": true
392           },
393           {
394             "fieldPath": "theme",
395             "columnName": "theme",
396             "affinity": "INTEGER",
397             "notNull": true,
398             "defaultValue": "-1"
399           },
400           {
401             "fieldPath": "preferredAccountsFilter",
402             "columnName": "preferred_accounts_filter",
403             "affinity": "TEXT",
404             "notNull": false
405           },
406           {
407             "fieldPath": "futureDates",
408             "columnName": "future_dates",
409             "affinity": "INTEGER",
410             "notNull": true
411           },
412           {
413             "fieldPath": "apiVersion",
414             "columnName": "api_version",
415             "affinity": "INTEGER",
416             "notNull": true
417           },
418           {
419             "fieldPath": "showCommodityByDefault",
420             "columnName": "show_commodity_by_default",
421             "affinity": "INTEGER",
422             "notNull": true
423           },
424           {
425             "fieldPath": "defaultCommodity",
426             "columnName": "default_commodity",
427             "affinity": "TEXT",
428             "notNull": false
429           },
430           {
431             "fieldPath": "showCommentsByDefault",
432             "columnName": "show_comments_by_default",
433             "affinity": "INTEGER",
434             "notNull": true,
435             "defaultValue": "1"
436           },
437           {
438             "fieldPath": "detectedVersionPre_1_19",
439             "columnName": "detected_version_pre_1_19",
440             "affinity": "INTEGER",
441             "notNull": true
442           },
443           {
444             "fieldPath": "detectedVersionMajor",
445             "columnName": "detected_version_major",
446             "affinity": "INTEGER",
447             "notNull": true
448           },
449           {
450             "fieldPath": "detectedVersionMinor",
451             "columnName": "detected_version_minor",
452             "affinity": "INTEGER",
453             "notNull": true
454           }
455         ],
456         "primaryKey": {
457           "columnNames": [
458             "uuid"
459           ],
460           "autoGenerate": false
461         },
462         "indices": [],
463         "foreignKeys": []
464       },
465       {
466         "tableName": "options",
467         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile` TEXT NOT NULL, `name` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`profile`, `name`))",
468         "fields": [
469           {
470             "fieldPath": "profile",
471             "columnName": "profile",
472             "affinity": "TEXT",
473             "notNull": true
474           },
475           {
476             "fieldPath": "name",
477             "columnName": "name",
478             "affinity": "TEXT",
479             "notNull": true
480           },
481           {
482             "fieldPath": "value",
483             "columnName": "value",
484             "affinity": "TEXT",
485             "notNull": false
486           }
487         ],
488         "primaryKey": {
489           "columnNames": [
490             "profile",
491             "name"
492           ],
493           "autoGenerate": false
494         },
495         "indices": [],
496         "foreignKeys": []
497       },
498       {
499         "tableName": "account_values",
500         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile` TEXT NOT NULL, `account` TEXT NOT NULL, `currency` TEXT NOT NULL DEFAULT '', `value` REAL NOT NULL, `generation` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`profile`, `account`, `currency`))",
501         "fields": [
502           {
503             "fieldPath": "profile",
504             "columnName": "profile",
505             "affinity": "TEXT",
506             "notNull": true
507           },
508           {
509             "fieldPath": "account",
510             "columnName": "account",
511             "affinity": "TEXT",
512             "notNull": true
513           },
514           {
515             "fieldPath": "currency",
516             "columnName": "currency",
517             "affinity": "TEXT",
518             "notNull": true,
519             "defaultValue": "''"
520           },
521           {
522             "fieldPath": "value",
523             "columnName": "value",
524             "affinity": "REAL",
525             "notNull": true
526           },
527           {
528             "fieldPath": "generation",
529             "columnName": "generation",
530             "affinity": "INTEGER",
531             "notNull": true,
532             "defaultValue": "0"
533           }
534         ],
535         "primaryKey": {
536           "columnNames": [
537             "profile",
538             "account",
539             "currency"
540           ],
541           "autoGenerate": false
542         },
543         "indices": [],
544         "foreignKeys": []
545       },
546       {
547         "tableName": "description_history",
548         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`description` TEXT NOT NULL COLLATE NOCASE, `description_upper` TEXT NOT NULL, `generation` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`description`))",
549         "fields": [
550           {
551             "fieldPath": "description",
552             "columnName": "description",
553             "affinity": "TEXT",
554             "notNull": true
555           },
556           {
557             "fieldPath": "descriptionUpper",
558             "columnName": "description_upper",
559             "affinity": "TEXT",
560             "notNull": true
561           },
562           {
563             "fieldPath": "generation",
564             "columnName": "generation",
565             "affinity": "INTEGER",
566             "notNull": true,
567             "defaultValue": "0"
568           }
569         ],
570         "primaryKey": {
571           "columnNames": [
572             "description"
573           ],
574           "autoGenerate": false
575         },
576         "indices": [],
577         "foreignKeys": []
578       },
579       {
580         "tableName": "transactions",
581         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile` TEXT NOT NULL, `id` INTEGER NOT NULL, `data_hash` TEXT NOT NULL, `year` INTEGER NOT NULL, `month` INTEGER NOT NULL, `day` INTEGER NOT NULL, `description` TEXT NOT NULL COLLATE NOCASE, `comment` TEXT, `generation` INTEGER NOT NULL, PRIMARY KEY(`profile`, `id`))",
582         "fields": [
583           {
584             "fieldPath": "profile",
585             "columnName": "profile",
586             "affinity": "TEXT",
587             "notNull": true
588           },
589           {
590             "fieldPath": "id",
591             "columnName": "id",
592             "affinity": "INTEGER",
593             "notNull": true
594           },
595           {
596             "fieldPath": "dataHash",
597             "columnName": "data_hash",
598             "affinity": "TEXT",
599             "notNull": true
600           },
601           {
602             "fieldPath": "year",
603             "columnName": "year",
604             "affinity": "INTEGER",
605             "notNull": true
606           },
607           {
608             "fieldPath": "month",
609             "columnName": "month",
610             "affinity": "INTEGER",
611             "notNull": true
612           },
613           {
614             "fieldPath": "day",
615             "columnName": "day",
616             "affinity": "INTEGER",
617             "notNull": true
618           },
619           {
620             "fieldPath": "description",
621             "columnName": "description",
622             "affinity": "TEXT",
623             "notNull": true
624           },
625           {
626             "fieldPath": "comment",
627             "columnName": "comment",
628             "affinity": "TEXT",
629             "notNull": false
630           },
631           {
632             "fieldPath": "generation",
633             "columnName": "generation",
634             "affinity": "INTEGER",
635             "notNull": true
636           }
637         ],
638         "primaryKey": {
639           "columnNames": [
640             "profile",
641             "id"
642           ],
643           "autoGenerate": false
644         },
645         "indices": [
646           {
647             "name": "un_transactions_data_hash",
648             "unique": true,
649             "columnNames": [
650               "profile",
651               "data_hash"
652             ],
653             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_data_hash` ON `${TABLE_NAME}` (`profile`, `data_hash`)"
654           },
655           {
656             "name": "idx_transaction_description",
657             "unique": false,
658             "columnNames": [
659               "description"
660             ],
661             "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
662           }
663         ],
664         "foreignKeys": []
665       }
666     ],
667     "views": [],
668     "setupQueries": [
669       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
670       "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '00d9b541473347c65a90e47ce9072436')"
671     ]
672   }
673 }