5 "identityHash": "0ab4d8a73295b6337c52ea561994b1c8",
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)",
14 "affinity": "INTEGER",
24 "fieldPath": "regularExpression",
25 "columnName": "regular_expression",
30 "fieldPath": "testText",
31 "columnName": "test_text",
36 "fieldPath": "transactionDescription",
37 "columnName": "transaction_description",
42 "fieldPath": "transactionDescriptionMatchGroup",
43 "columnName": "transaction_description_match_group",
44 "affinity": "INTEGER",
48 "fieldPath": "transactionComment",
49 "columnName": "transaction_comment",
54 "fieldPath": "transactionCommentMatchGroup",
55 "columnName": "transaction_comment_match_group",
56 "affinity": "INTEGER",
60 "fieldPath": "dateYear",
61 "columnName": "date_year",
62 "affinity": "INTEGER",
66 "fieldPath": "dateYearMatchGroup",
67 "columnName": "date_year_match_group",
68 "affinity": "INTEGER",
72 "fieldPath": "dateMonth",
73 "columnName": "date_month",
74 "affinity": "INTEGER",
78 "fieldPath": "dateMonthMatchGroup",
79 "columnName": "date_month_match_group",
80 "affinity": "INTEGER",
84 "fieldPath": "dateDay",
85 "columnName": "date_day",
86 "affinity": "INTEGER",
90 "fieldPath": "dateDayMatchGroup",
91 "columnName": "date_day_match_group",
92 "affinity": "INTEGER",
96 "fieldPath": "isFallback",
97 "columnName": "is_fallback",
98 "affinity": "INTEGER",
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 )",
118 "affinity": "INTEGER",
122 "fieldPath": "templateId",
123 "columnName": "template_id",
124 "affinity": "INTEGER",
128 "fieldPath": "accountName",
134 "fieldPath": "position",
135 "columnName": "position",
136 "affinity": "INTEGER",
140 "fieldPath": "accountNameMatchGroup",
141 "columnName": "acc_match_group",
142 "affinity": "INTEGER",
146 "fieldPath": "currency",
147 "columnName": "currency",
148 "affinity": "INTEGER",
152 "fieldPath": "currencyMatchGroup",
153 "columnName": "currency_match_group",
154 "affinity": "INTEGER",
158 "fieldPath": "amount",
159 "columnName": "amount",
164 "fieldPath": "amountMatchGroup",
165 "columnName": "amount_match_group",
166 "affinity": "INTEGER",
170 "fieldPath": "accountComment",
171 "columnName": "comment",
176 "fieldPath": "accountCommentMatchGroup",
177 "columnName": "comment_match_group",
178 "affinity": "INTEGER",
182 "fieldPath": "negateAmount",
183 "columnName": "negate_amount",
184 "affinity": "INTEGER",
196 "name": "fk_template_accounts_template",
201 "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_template` ON `${TABLE_NAME}` (`template_id`)"
204 "name": "fk_template_accounts_currency",
209 "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_currency` ON `${TABLE_NAME}` (`currency`)"
214 "table": "templates",
215 "onDelete": "CASCADE",
216 "onUpdate": "RESTRICT",
220 "referencedColumns": [
225 "table": "currencies",
226 "onDelete": "RESTRICT",
227 "onUpdate": "RESTRICT",
231 "referencedColumns": [
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)",
244 "affinity": "INTEGER",
249 "columnName": "name",
254 "fieldPath": "position",
255 "columnName": "position",
260 "fieldPath": "hasGap",
261 "columnName": "has_gap",
262 "affinity": "INTEGER",
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 )",
282 "affinity": "INTEGER",
286 "fieldPath": "profileId",
287 "columnName": "profile_id",
288 "affinity": "INTEGER",
292 "fieldPath": "level",
293 "columnName": "level",
294 "affinity": "INTEGER",
299 "columnName": "name",
304 "fieldPath": "nameUpper",
305 "columnName": "name_upper",
310 "fieldPath": "parentName",
311 "columnName": "parent_name",
316 "fieldPath": "expanded",
317 "columnName": "expanded",
318 "affinity": "INTEGER",
323 "fieldPath": "amountsExpanded",
324 "columnName": "amounts_expanded",
325 "affinity": "INTEGER",
330 "fieldPath": "generation",
331 "columnName": "generation",
332 "affinity": "INTEGER",
345 "name": "un_account_name",
351 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_name` ON `${TABLE_NAME}` (`profile_id`, `name`)"
354 "name": "fk_account_profile",
359 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_profile` ON `${TABLE_NAME}` (`profile_id`)"
365 "onDelete": "CASCADE",
366 "onUpdate": "RESTRICT",
370 "referencedColumns": [
377 "tableName": "profiles",
378 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `deprecated_uuid` TEXT, `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)",
383 "affinity": "INTEGER",
388 "columnName": "name",
393 "fieldPath": "deprecatedUUID",
394 "columnName": "deprecated_uuid",
405 "fieldPath": "useAuthentication",
406 "columnName": "use_authentication",
407 "affinity": "INTEGER",
411 "fieldPath": "authUser",
412 "columnName": "auth_user",
417 "fieldPath": "authPassword",
418 "columnName": "auth_password",
423 "fieldPath": "orderNo",
424 "columnName": "order_no",
425 "affinity": "INTEGER",
429 "fieldPath": "permitPosting",
430 "columnName": "permit_posting",
431 "affinity": "INTEGER",
435 "fieldPath": "theme",
436 "columnName": "theme",
437 "affinity": "INTEGER",
442 "fieldPath": "preferredAccountsFilter",
443 "columnName": "preferred_accounts_filter",
448 "fieldPath": "futureDates",
449 "columnName": "future_dates",
450 "affinity": "INTEGER",
454 "fieldPath": "apiVersion",
455 "columnName": "api_version",
456 "affinity": "INTEGER",
460 "fieldPath": "showCommodityByDefault",
461 "columnName": "show_commodity_by_default",
462 "affinity": "INTEGER",
466 "fieldPath": "defaultCommodity",
467 "columnName": "default_commodity",
472 "fieldPath": "showCommentsByDefault",
473 "columnName": "show_comments_by_default",
474 "affinity": "INTEGER",
479 "fieldPath": "detectedVersionPre_1_19",
480 "columnName": "detected_version_pre_1_19",
481 "affinity": "INTEGER",
485 "fieldPath": "detectedVersionMajor",
486 "columnName": "detected_version_major",
487 "affinity": "INTEGER",
491 "fieldPath": "detectedVersionMinor",
492 "columnName": "detected_version_minor",
493 "affinity": "INTEGER",
507 "tableName": "options",
508 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`profile_id`, `name`))",
511 "fieldPath": "profileId",
512 "columnName": "profile_id",
513 "affinity": "INTEGER",
518 "columnName": "name",
523 "fieldPath": "value",
524 "columnName": "value",
534 "autoGenerate": false
540 "tableName": "account_values",
541 "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 )",
546 "affinity": "INTEGER",
550 "fieldPath": "accountId",
551 "columnName": "account_id",
552 "affinity": "INTEGER",
556 "fieldPath": "currency",
557 "columnName": "currency",
563 "fieldPath": "value",
564 "columnName": "value",
569 "fieldPath": "generation",
570 "columnName": "generation",
571 "affinity": "INTEGER",
584 "name": "un_account_values",
590 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_values` ON `${TABLE_NAME}` (`account_id`, `currency`)"
593 "name": "fk_account_value_acc",
598 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_value_acc` ON `${TABLE_NAME}` (`account_id`)"
604 "onDelete": "CASCADE",
605 "onUpdate": "RESTRICT",
609 "referencedColumns": [
616 "tableName": "description_history",
617 "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`))",
620 "fieldPath": "description",
621 "columnName": "description",
626 "fieldPath": "descriptionUpper",
627 "columnName": "description_upper",
632 "fieldPath": "generation",
633 "columnName": "generation",
634 "affinity": "INTEGER",
643 "autoGenerate": false
649 "tableName": "transactions",
650 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `ledger_id` INTEGER 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 )",
655 "affinity": "INTEGER",
659 "fieldPath": "ledgerId",
660 "columnName": "ledger_id",
661 "affinity": "INTEGER",
665 "fieldPath": "profileId",
666 "columnName": "profile_id",
667 "affinity": "INTEGER",
671 "fieldPath": "dataHash",
672 "columnName": "data_hash",
678 "columnName": "year",
679 "affinity": "INTEGER",
683 "fieldPath": "month",
684 "columnName": "month",
685 "affinity": "INTEGER",
691 "affinity": "INTEGER",
695 "fieldPath": "description",
696 "columnName": "description",
701 "fieldPath": "comment",
702 "columnName": "comment",
707 "fieldPath": "generation",
708 "columnName": "generation",
709 "affinity": "INTEGER",
721 "name": "un_transactions_ledger_id",
727 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_ledger_id` ON `${TABLE_NAME}` (`profile_id`, `ledger_id`)"
730 "name": "idx_transaction_description",
735 "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
738 "name": "fk_transaction_profile",
743 "createSql": "CREATE INDEX IF NOT EXISTS `fk_transaction_profile` ON `${TABLE_NAME}` (`profile_id`)"
749 "onDelete": "CASCADE",
750 "onUpdate": "RESTRICT",
754 "referencedColumns": [
761 "tableName": "transaction_accounts",
762 "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 )",
767 "affinity": "INTEGER",
771 "fieldPath": "transactionId",
772 "columnName": "transaction_id",
773 "affinity": "INTEGER",
777 "fieldPath": "orderNo",
778 "columnName": "order_no",
779 "affinity": "INTEGER",
783 "fieldPath": "accountName",
784 "columnName": "account_name",
789 "fieldPath": "currency",
790 "columnName": "currency",
796 "fieldPath": "amount",
797 "columnName": "amount",
802 "fieldPath": "comment",
803 "columnName": "comment",
808 "fieldPath": "generation",
809 "columnName": "generation",
810 "affinity": "INTEGER",
823 "name": "fk_trans_acc_trans",
828 "createSql": "CREATE INDEX IF NOT EXISTS `fk_trans_acc_trans` ON `${TABLE_NAME}` (`transaction_id`)"
831 "name": "un_transaction_accounts",
837 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transaction_accounts` ON `${TABLE_NAME}` (`transaction_id`, `order_no`)"
842 "table": "transactions",
843 "onDelete": "CASCADE",
844 "onUpdate": "RESTRICT",
848 "referencedColumns": [
857 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
858 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0ab4d8a73295b6337c52ea561994b1c8')"