]> git.ktnx.net Git - mobile-ledger.git/blob - app/schemas/net.ktnx.mobileledger.db.DB/59.json
migrate to surrogate IDs for all database objects
[mobile-ledger.git] / app / schemas / net.ktnx.mobileledger.db.DB / 59.json
1 {
2   "formatVersion": 1,
3   "database": {
4     "version": 59,
5     "identityHash": "a56d86c03528ece865d81fd8171c819f",
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}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `profile_id` INTEGER NOT NULL, `level` INTEGER 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, FOREIGN KEY(`profile_id`) REFERENCES `profiles`(`id`) ON UPDATE RESTRICT ON DELETE CASCADE )",
278         "fields": [
279           {
280             "fieldPath": "id",
281             "columnName": "id",
282             "affinity": "INTEGER",
283             "notNull": true
284           },
285           {
286             "fieldPath": "profileId",
287             "columnName": "profile_id",
288             "affinity": "INTEGER",
289             "notNull": true
290           },
291           {
292             "fieldPath": "level",
293             "columnName": "level",
294             "affinity": "INTEGER",
295             "notNull": true
296           },
297           {
298             "fieldPath": "name",
299             "columnName": "name",
300             "affinity": "TEXT",
301             "notNull": true
302           },
303           {
304             "fieldPath": "nameUpper",
305             "columnName": "name_upper",
306             "affinity": "TEXT",
307             "notNull": true
308           },
309           {
310             "fieldPath": "parentName",
311             "columnName": "parent_name",
312             "affinity": "TEXT",
313             "notNull": false
314           },
315           {
316             "fieldPath": "expanded",
317             "columnName": "expanded",
318             "affinity": "INTEGER",
319             "notNull": true,
320             "defaultValue": "1"
321           },
322           {
323             "fieldPath": "amountsExpanded",
324             "columnName": "amounts_expanded",
325             "affinity": "INTEGER",
326             "notNull": true,
327             "defaultValue": "0"
328           },
329           {
330             "fieldPath": "generation",
331             "columnName": "generation",
332             "affinity": "INTEGER",
333             "notNull": true,
334             "defaultValue": "0"
335           }
336         ],
337         "primaryKey": {
338           "columnNames": [
339             "id"
340           ],
341           "autoGenerate": true
342         },
343         "indices": [
344           {
345             "name": "un_account_name",
346             "unique": true,
347             "columnNames": [
348               "profile_id",
349               "name"
350             ],
351             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_name` ON `${TABLE_NAME}` (`profile_id`, `name`)"
352           },
353           {
354             "name": "fk_account_profile",
355             "unique": false,
356             "columnNames": [
357               "profile_id"
358             ],
359             "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_profile` ON `${TABLE_NAME}` (`profile_id`)"
360           }
361         ],
362         "foreignKeys": [
363           {
364             "table": "profiles",
365             "onDelete": "CASCADE",
366             "onUpdate": "RESTRICT",
367             "columns": [
368               "profile_id"
369             ],
370             "referencedColumns": [
371               "id"
372             ]
373           }
374         ]
375       },
376       {
377         "tableName": "profiles",
378         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT 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)",
379         "fields": [
380           {
381             "fieldPath": "id",
382             "columnName": "id",
383             "affinity": "INTEGER",
384             "notNull": true
385           },
386           {
387             "fieldPath": "name",
388             "columnName": "name",
389             "affinity": "TEXT",
390             "notNull": true
391           },
392           {
393             "fieldPath": "url",
394             "columnName": "url",
395             "affinity": "TEXT",
396             "notNull": true
397           },
398           {
399             "fieldPath": "useAuthentication",
400             "columnName": "use_authentication",
401             "affinity": "INTEGER",
402             "notNull": true
403           },
404           {
405             "fieldPath": "authUser",
406             "columnName": "auth_user",
407             "affinity": "TEXT",
408             "notNull": false
409           },
410           {
411             "fieldPath": "authPassword",
412             "columnName": "auth_password",
413             "affinity": "TEXT",
414             "notNull": false
415           },
416           {
417             "fieldPath": "orderNo",
418             "columnName": "order_no",
419             "affinity": "INTEGER",
420             "notNull": true
421           },
422           {
423             "fieldPath": "permitPosting",
424             "columnName": "permit_posting",
425             "affinity": "INTEGER",
426             "notNull": true
427           },
428           {
429             "fieldPath": "theme",
430             "columnName": "theme",
431             "affinity": "INTEGER",
432             "notNull": true,
433             "defaultValue": "-1"
434           },
435           {
436             "fieldPath": "preferredAccountsFilter",
437             "columnName": "preferred_accounts_filter",
438             "affinity": "TEXT",
439             "notNull": false
440           },
441           {
442             "fieldPath": "futureDates",
443             "columnName": "future_dates",
444             "affinity": "INTEGER",
445             "notNull": true
446           },
447           {
448             "fieldPath": "apiVersion",
449             "columnName": "api_version",
450             "affinity": "INTEGER",
451             "notNull": true
452           },
453           {
454             "fieldPath": "showCommodityByDefault",
455             "columnName": "show_commodity_by_default",
456             "affinity": "INTEGER",
457             "notNull": true
458           },
459           {
460             "fieldPath": "defaultCommodity",
461             "columnName": "default_commodity",
462             "affinity": "TEXT",
463             "notNull": false
464           },
465           {
466             "fieldPath": "showCommentsByDefault",
467             "columnName": "show_comments_by_default",
468             "affinity": "INTEGER",
469             "notNull": true,
470             "defaultValue": "1"
471           },
472           {
473             "fieldPath": "detectedVersionPre_1_19",
474             "columnName": "detected_version_pre_1_19",
475             "affinity": "INTEGER",
476             "notNull": true
477           },
478           {
479             "fieldPath": "detectedVersionMajor",
480             "columnName": "detected_version_major",
481             "affinity": "INTEGER",
482             "notNull": true
483           },
484           {
485             "fieldPath": "detectedVersionMinor",
486             "columnName": "detected_version_minor",
487             "affinity": "INTEGER",
488             "notNull": true
489           }
490         ],
491         "primaryKey": {
492           "columnNames": [
493             "id"
494           ],
495           "autoGenerate": true
496         },
497         "indices": [],
498         "foreignKeys": []
499       },
500       {
501         "tableName": "options",
502         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`profile`, `name`))",
503         "fields": [
504           {
505             "fieldPath": "profile",
506             "columnName": "profile",
507             "affinity": "INTEGER",
508             "notNull": true
509           },
510           {
511             "fieldPath": "name",
512             "columnName": "name",
513             "affinity": "TEXT",
514             "notNull": true
515           },
516           {
517             "fieldPath": "value",
518             "columnName": "value",
519             "affinity": "TEXT",
520             "notNull": false
521           }
522         ],
523         "primaryKey": {
524           "columnNames": [
525             "profile",
526             "name"
527           ],
528           "autoGenerate": false
529         },
530         "indices": [],
531         "foreignKeys": []
532       },
533       {
534         "tableName": "account_values",
535         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `account_id` INTEGER NOT NULL, `currency` TEXT NOT NULL DEFAULT '', `value` REAL NOT NULL, `generation` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`account_id`) REFERENCES `accounts`(`id`) ON UPDATE RESTRICT ON DELETE CASCADE )",
536         "fields": [
537           {
538             "fieldPath": "id",
539             "columnName": "id",
540             "affinity": "INTEGER",
541             "notNull": true
542           },
543           {
544             "fieldPath": "account_id",
545             "columnName": "account_id",
546             "affinity": "INTEGER",
547             "notNull": true
548           },
549           {
550             "fieldPath": "currency",
551             "columnName": "currency",
552             "affinity": "TEXT",
553             "notNull": true,
554             "defaultValue": "''"
555           },
556           {
557             "fieldPath": "value",
558             "columnName": "value",
559             "affinity": "REAL",
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             "id"
573           ],
574           "autoGenerate": true
575         },
576         "indices": [
577           {
578             "name": "un_account_values",
579             "unique": true,
580             "columnNames": [
581               "account_id",
582               "currency"
583             ],
584             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_values` ON `${TABLE_NAME}` (`account_id`, `currency`)"
585           },
586           {
587             "name": "fk_account_value_acc",
588             "unique": false,
589             "columnNames": [
590               "account_id"
591             ],
592             "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_value_acc` ON `${TABLE_NAME}` (`account_id`)"
593           }
594         ],
595         "foreignKeys": [
596           {
597             "table": "accounts",
598             "onDelete": "CASCADE",
599             "onUpdate": "RESTRICT",
600             "columns": [
601               "account_id"
602             ],
603             "referencedColumns": [
604               "id"
605             ]
606           }
607         ]
608       },
609       {
610         "tableName": "description_history",
611         "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`))",
612         "fields": [
613           {
614             "fieldPath": "description",
615             "columnName": "description",
616             "affinity": "TEXT",
617             "notNull": true
618           },
619           {
620             "fieldPath": "descriptionUpper",
621             "columnName": "description_upper",
622             "affinity": "TEXT",
623             "notNull": true
624           },
625           {
626             "fieldPath": "generation",
627             "columnName": "generation",
628             "affinity": "INTEGER",
629             "notNull": true,
630             "defaultValue": "0"
631           }
632         ],
633         "primaryKey": {
634           "columnNames": [
635             "description"
636           ],
637           "autoGenerate": false
638         },
639         "indices": [],
640         "foreignKeys": []
641       },
642       {
643         "tableName": "transactions",
644         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `profile_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, FOREIGN KEY(`profile_id`) REFERENCES `profiles`(`id`) ON UPDATE RESTRICT ON DELETE CASCADE )",
645         "fields": [
646           {
647             "fieldPath": "id",
648             "columnName": "id",
649             "affinity": "INTEGER",
650             "notNull": true
651           },
652           {
653             "fieldPath": "profileId",
654             "columnName": "profile_id",
655             "affinity": "INTEGER",
656             "notNull": true
657           },
658           {
659             "fieldPath": "dataHash",
660             "columnName": "data_hash",
661             "affinity": "TEXT",
662             "notNull": true
663           },
664           {
665             "fieldPath": "year",
666             "columnName": "year",
667             "affinity": "INTEGER",
668             "notNull": true
669           },
670           {
671             "fieldPath": "month",
672             "columnName": "month",
673             "affinity": "INTEGER",
674             "notNull": true
675           },
676           {
677             "fieldPath": "day",
678             "columnName": "day",
679             "affinity": "INTEGER",
680             "notNull": true
681           },
682           {
683             "fieldPath": "description",
684             "columnName": "description",
685             "affinity": "TEXT",
686             "notNull": true
687           },
688           {
689             "fieldPath": "comment",
690             "columnName": "comment",
691             "affinity": "TEXT",
692             "notNull": false
693           },
694           {
695             "fieldPath": "generation",
696             "columnName": "generation",
697             "affinity": "INTEGER",
698             "notNull": true
699           }
700         ],
701         "primaryKey": {
702           "columnNames": [
703             "id"
704           ],
705           "autoGenerate": true
706         },
707         "indices": [
708           {
709             "name": "un_transactions_data_hash",
710             "unique": true,
711             "columnNames": [
712               "profile_id",
713               "data_hash"
714             ],
715             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_data_hash` ON `${TABLE_NAME}` (`profile_id`, `data_hash`)"
716           },
717           {
718             "name": "idx_transaction_description",
719             "unique": false,
720             "columnNames": [
721               "description"
722             ],
723             "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
724           },
725           {
726             "name": "fk_transaction_profile",
727             "unique": false,
728             "columnNames": [
729               "profile_id"
730             ],
731             "createSql": "CREATE INDEX IF NOT EXISTS `fk_transaction_profile` ON `${TABLE_NAME}` (`profile_id`)"
732           }
733         ],
734         "foreignKeys": [
735           {
736             "table": "profiles",
737             "onDelete": "CASCADE",
738             "onUpdate": "RESTRICT",
739             "columns": [
740               "profile_id"
741             ],
742             "referencedColumns": [
743               "id"
744             ]
745           }
746         ]
747       },
748       {
749         "tableName": "transaction_accounts",
750         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `transaction_id` INTEGER NOT NULL, `order_no` INTEGER NOT NULL, `account_name` TEXT NOT NULL, `currency` TEXT NOT NULL DEFAULT '', `amount` REAL NOT NULL, `comment` TEXT, `generation` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`transaction_id`) REFERENCES `transactions`(`id`) ON UPDATE RESTRICT ON DELETE CASCADE )",
751         "fields": [
752           {
753             "fieldPath": "id",
754             "columnName": "id",
755             "affinity": "INTEGER",
756             "notNull": true
757           },
758           {
759             "fieldPath": "transactionId",
760             "columnName": "transaction_id",
761             "affinity": "INTEGER",
762             "notNull": true
763           },
764           {
765             "fieldPath": "orderNo",
766             "columnName": "order_no",
767             "affinity": "INTEGER",
768             "notNull": true
769           },
770           {
771             "fieldPath": "accountName",
772             "columnName": "account_name",
773             "affinity": "TEXT",
774             "notNull": true
775           },
776           {
777             "fieldPath": "currency",
778             "columnName": "currency",
779             "affinity": "TEXT",
780             "notNull": true,
781             "defaultValue": "''"
782           },
783           {
784             "fieldPath": "amount",
785             "columnName": "amount",
786             "affinity": "REAL",
787             "notNull": true
788           },
789           {
790             "fieldPath": "comment",
791             "columnName": "comment",
792             "affinity": "TEXT",
793             "notNull": false
794           },
795           {
796             "fieldPath": "generation",
797             "columnName": "generation",
798             "affinity": "INTEGER",
799             "notNull": true,
800             "defaultValue": "0"
801           }
802         ],
803         "primaryKey": {
804           "columnNames": [
805             "id"
806           ],
807           "autoGenerate": true
808         },
809         "indices": [
810           {
811             "name": "fk_tran_acc_trans",
812             "unique": false,
813             "columnNames": [
814               "transaction_id"
815             ],
816             "createSql": "CREATE INDEX IF NOT EXISTS `fk_tran_acc_trans` ON `${TABLE_NAME}` (`transaction_id`)"
817           },
818           {
819             "name": "un_transaction_accounts",
820             "unique": true,
821             "columnNames": [
822               "transaction_id",
823               "order_no"
824             ],
825             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transaction_accounts` ON `${TABLE_NAME}` (`transaction_id`, `order_no`)"
826           }
827         ],
828         "foreignKeys": [
829           {
830             "table": "transactions",
831             "onDelete": "CASCADE",
832             "onUpdate": "RESTRICT",
833             "columns": [
834               "transaction_id"
835             ],
836             "referencedColumns": [
837               "id"
838             ]
839           }
840         ]
841       }
842     ],
843     "views": [],
844     "setupQueries": [
845       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
846       "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a56d86c03528ece865d81fd8171c819f')"
847     ]
848   }
849 }