5 "identityHash": "0739ea866a6aebb4217f68a7fcda5bc6",
8 "tableName": "templates",
9 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `uuid` 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",
30 "fieldPath": "regularExpression",
31 "columnName": "regular_expression",
36 "fieldPath": "testText",
37 "columnName": "test_text",
42 "fieldPath": "transactionDescription",
43 "columnName": "transaction_description",
48 "fieldPath": "transactionDescriptionMatchGroup",
49 "columnName": "transaction_description_match_group",
50 "affinity": "INTEGER",
54 "fieldPath": "transactionComment",
55 "columnName": "transaction_comment",
60 "fieldPath": "transactionCommentMatchGroup",
61 "columnName": "transaction_comment_match_group",
62 "affinity": "INTEGER",
66 "fieldPath": "dateYear",
67 "columnName": "date_year",
68 "affinity": "INTEGER",
72 "fieldPath": "dateYearMatchGroup",
73 "columnName": "date_year_match_group",
74 "affinity": "INTEGER",
78 "fieldPath": "dateMonth",
79 "columnName": "date_month",
80 "affinity": "INTEGER",
84 "fieldPath": "dateMonthMatchGroup",
85 "columnName": "date_month_match_group",
86 "affinity": "INTEGER",
90 "fieldPath": "dateDay",
91 "columnName": "date_day",
92 "affinity": "INTEGER",
96 "fieldPath": "dateDayMatchGroup",
97 "columnName": "date_day_match_group",
98 "affinity": "INTEGER",
102 "fieldPath": "isFallback",
103 "columnName": "is_fallback",
104 "affinity": "INTEGER",
116 "name": "templates_uuid_idx",
121 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `templates_uuid_idx` ON `${TABLE_NAME}` (`uuid`)"
127 "tableName": "template_accounts",
128 "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 )",
133 "affinity": "INTEGER",
137 "fieldPath": "templateId",
138 "columnName": "template_id",
139 "affinity": "INTEGER",
143 "fieldPath": "accountName",
149 "fieldPath": "position",
150 "columnName": "position",
151 "affinity": "INTEGER",
155 "fieldPath": "accountNameMatchGroup",
156 "columnName": "acc_match_group",
157 "affinity": "INTEGER",
161 "fieldPath": "currency",
162 "columnName": "currency",
163 "affinity": "INTEGER",
167 "fieldPath": "currencyMatchGroup",
168 "columnName": "currency_match_group",
169 "affinity": "INTEGER",
173 "fieldPath": "amount",
174 "columnName": "amount",
179 "fieldPath": "amountMatchGroup",
180 "columnName": "amount_match_group",
181 "affinity": "INTEGER",
185 "fieldPath": "accountComment",
186 "columnName": "comment",
191 "fieldPath": "accountCommentMatchGroup",
192 "columnName": "comment_match_group",
193 "affinity": "INTEGER",
197 "fieldPath": "negateAmount",
198 "columnName": "negate_amount",
199 "affinity": "INTEGER",
211 "name": "fk_template_accounts_template",
216 "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_template` ON `${TABLE_NAME}` (`template_id`)"
219 "name": "fk_template_accounts_currency",
224 "createSql": "CREATE INDEX IF NOT EXISTS `fk_template_accounts_currency` ON `${TABLE_NAME}` (`currency`)"
229 "table": "templates",
230 "onDelete": "CASCADE",
231 "onUpdate": "RESTRICT",
235 "referencedColumns": [
240 "table": "currencies",
241 "onDelete": "RESTRICT",
242 "onUpdate": "RESTRICT",
246 "referencedColumns": [
253 "tableName": "currencies",
254 "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)",
259 "affinity": "INTEGER",
264 "columnName": "name",
269 "fieldPath": "position",
270 "columnName": "position",
275 "fieldPath": "hasGap",
276 "columnName": "has_gap",
277 "affinity": "INTEGER",
289 "name": "currency_name_idx",
294 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `currency_name_idx` ON `${TABLE_NAME}` (`name`)"
300 "tableName": "accounts",
301 "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 )",
306 "affinity": "INTEGER",
310 "fieldPath": "profileId",
311 "columnName": "profile_id",
312 "affinity": "INTEGER",
316 "fieldPath": "level",
317 "columnName": "level",
318 "affinity": "INTEGER",
323 "columnName": "name",
328 "fieldPath": "nameUpper",
329 "columnName": "name_upper",
334 "fieldPath": "parentName",
335 "columnName": "parent_name",
340 "fieldPath": "expanded",
341 "columnName": "expanded",
342 "affinity": "INTEGER",
347 "fieldPath": "amountsExpanded",
348 "columnName": "amounts_expanded",
349 "affinity": "INTEGER",
354 "fieldPath": "generation",
355 "columnName": "generation",
356 "affinity": "INTEGER",
369 "name": "un_account_name",
375 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_name` ON `${TABLE_NAME}` (`profile_id`, `name`)"
378 "name": "fk_account_profile",
383 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_profile` ON `${TABLE_NAME}` (`profile_id`)"
389 "onDelete": "CASCADE",
390 "onUpdate": "RESTRICT",
394 "referencedColumns": [
401 "tableName": "profiles",
402 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `uuid` 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)",
407 "affinity": "INTEGER",
412 "columnName": "name",
418 "columnName": "uuid",
429 "fieldPath": "useAuthentication",
430 "columnName": "use_authentication",
431 "affinity": "INTEGER",
435 "fieldPath": "authUser",
436 "columnName": "auth_user",
441 "fieldPath": "authPassword",
442 "columnName": "auth_password",
447 "fieldPath": "orderNo",
448 "columnName": "order_no",
449 "affinity": "INTEGER",
453 "fieldPath": "permitPosting",
454 "columnName": "permit_posting",
455 "affinity": "INTEGER",
459 "fieldPath": "theme",
460 "columnName": "theme",
461 "affinity": "INTEGER",
466 "fieldPath": "preferredAccountsFilter",
467 "columnName": "preferred_accounts_filter",
472 "fieldPath": "futureDates",
473 "columnName": "future_dates",
474 "affinity": "INTEGER",
478 "fieldPath": "apiVersion",
479 "columnName": "api_version",
480 "affinity": "INTEGER",
484 "fieldPath": "showCommodityByDefault",
485 "columnName": "show_commodity_by_default",
486 "affinity": "INTEGER",
490 "fieldPath": "defaultCommodity",
491 "columnName": "default_commodity",
496 "fieldPath": "showCommentsByDefault",
497 "columnName": "show_comments_by_default",
498 "affinity": "INTEGER",
503 "fieldPath": "detectedVersionPre_1_19",
504 "columnName": "detected_version_pre_1_19",
505 "affinity": "INTEGER",
509 "fieldPath": "detectedVersionMajor",
510 "columnName": "detected_version_major",
511 "affinity": "INTEGER",
515 "fieldPath": "detectedVersionMinor",
516 "columnName": "detected_version_minor",
517 "affinity": "INTEGER",
529 "name": "profiles_uuid_idx",
534 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `profiles_uuid_idx` ON `${TABLE_NAME}` (`uuid`)"
540 "tableName": "options",
541 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`profile_id`, `name`))",
544 "fieldPath": "profileId",
545 "columnName": "profile_id",
546 "affinity": "INTEGER",
551 "columnName": "name",
556 "fieldPath": "value",
557 "columnName": "value",
567 "autoGenerate": false
573 "tableName": "account_values",
574 "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 )",
579 "affinity": "INTEGER",
583 "fieldPath": "accountId",
584 "columnName": "account_id",
585 "affinity": "INTEGER",
589 "fieldPath": "currency",
590 "columnName": "currency",
596 "fieldPath": "value",
597 "columnName": "value",
602 "fieldPath": "generation",
603 "columnName": "generation",
604 "affinity": "INTEGER",
617 "name": "un_account_values",
623 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_values` ON `${TABLE_NAME}` (`account_id`, `currency`)"
626 "name": "fk_account_value_acc",
631 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_value_acc` ON `${TABLE_NAME}` (`account_id`)"
637 "onDelete": "CASCADE",
638 "onUpdate": "RESTRICT",
642 "referencedColumns": [
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, `description_uc` TEXT NOT NULL, `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": "descriptionUpper",
702 "columnName": "description_uc",
707 "fieldPath": "comment",
708 "columnName": "comment",
713 "fieldPath": "generation",
714 "columnName": "generation",
715 "affinity": "INTEGER",
727 "name": "un_transactions_ledger_id",
733 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_ledger_id` ON `${TABLE_NAME}` (`profile_id`, `ledger_id`)"
736 "name": "idx_transaction_description",
741 "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
744 "name": "fk_transaction_profile",
749 "createSql": "CREATE INDEX IF NOT EXISTS `fk_transaction_profile` ON `${TABLE_NAME}` (`profile_id`)"
755 "onDelete": "CASCADE",
756 "onUpdate": "RESTRICT",
760 "referencedColumns": [
767 "tableName": "transaction_accounts",
768 "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 )",
773 "affinity": "INTEGER",
777 "fieldPath": "transactionId",
778 "columnName": "transaction_id",
779 "affinity": "INTEGER",
783 "fieldPath": "orderNo",
784 "columnName": "order_no",
785 "affinity": "INTEGER",
789 "fieldPath": "accountName",
790 "columnName": "account_name",
795 "fieldPath": "currency",
796 "columnName": "currency",
802 "fieldPath": "amount",
803 "columnName": "amount",
808 "fieldPath": "comment",
809 "columnName": "comment",
814 "fieldPath": "generation",
815 "columnName": "generation",
816 "affinity": "INTEGER",
829 "name": "fk_trans_acc_trans",
834 "createSql": "CREATE INDEX IF NOT EXISTS `fk_trans_acc_trans` ON `${TABLE_NAME}` (`transaction_id`)"
837 "name": "un_transaction_accounts",
843 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transaction_accounts` ON `${TABLE_NAME}` (`transaction_id`, `order_no`)"
848 "table": "transactions",
849 "onDelete": "CASCADE",
850 "onUpdate": "RESTRICT",
854 "referencedColumns": [
863 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
864 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0739ea866a6aebb4217f68a7fcda5bc6')"