5 "identityHash": "69591403d82a378a35d1f22e7e8f637f",
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",
274 "name": "currency_name_idx",
279 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `currency_name_idx` ON `${TABLE_NAME}` (`name`)"
285 "tableName": "accounts",
286 "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 )",
291 "affinity": "INTEGER",
295 "fieldPath": "profileId",
296 "columnName": "profile_id",
297 "affinity": "INTEGER",
301 "fieldPath": "level",
302 "columnName": "level",
303 "affinity": "INTEGER",
308 "columnName": "name",
313 "fieldPath": "nameUpper",
314 "columnName": "name_upper",
319 "fieldPath": "parentName",
320 "columnName": "parent_name",
325 "fieldPath": "expanded",
326 "columnName": "expanded",
327 "affinity": "INTEGER",
332 "fieldPath": "amountsExpanded",
333 "columnName": "amounts_expanded",
334 "affinity": "INTEGER",
339 "fieldPath": "generation",
340 "columnName": "generation",
341 "affinity": "INTEGER",
354 "name": "un_account_name",
360 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_name` ON `${TABLE_NAME}` (`profile_id`, `name`)"
363 "name": "fk_account_profile",
368 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_profile` ON `${TABLE_NAME}` (`profile_id`)"
374 "onDelete": "CASCADE",
375 "onUpdate": "RESTRICT",
379 "referencedColumns": [
386 "tableName": "profiles",
387 "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)",
392 "affinity": "INTEGER",
397 "columnName": "name",
402 "fieldPath": "deprecatedUUID",
403 "columnName": "deprecated_uuid",
414 "fieldPath": "useAuthentication",
415 "columnName": "use_authentication",
416 "affinity": "INTEGER",
420 "fieldPath": "authUser",
421 "columnName": "auth_user",
426 "fieldPath": "authPassword",
427 "columnName": "auth_password",
432 "fieldPath": "orderNo",
433 "columnName": "order_no",
434 "affinity": "INTEGER",
438 "fieldPath": "permitPosting",
439 "columnName": "permit_posting",
440 "affinity": "INTEGER",
444 "fieldPath": "theme",
445 "columnName": "theme",
446 "affinity": "INTEGER",
451 "fieldPath": "preferredAccountsFilter",
452 "columnName": "preferred_accounts_filter",
457 "fieldPath": "futureDates",
458 "columnName": "future_dates",
459 "affinity": "INTEGER",
463 "fieldPath": "apiVersion",
464 "columnName": "api_version",
465 "affinity": "INTEGER",
469 "fieldPath": "showCommodityByDefault",
470 "columnName": "show_commodity_by_default",
471 "affinity": "INTEGER",
475 "fieldPath": "defaultCommodity",
476 "columnName": "default_commodity",
481 "fieldPath": "showCommentsByDefault",
482 "columnName": "show_comments_by_default",
483 "affinity": "INTEGER",
488 "fieldPath": "detectedVersionPre_1_19",
489 "columnName": "detected_version_pre_1_19",
490 "affinity": "INTEGER",
494 "fieldPath": "detectedVersionMajor",
495 "columnName": "detected_version_major",
496 "affinity": "INTEGER",
500 "fieldPath": "detectedVersionMinor",
501 "columnName": "detected_version_minor",
502 "affinity": "INTEGER",
516 "tableName": "options",
517 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`profile_id`, `name`))",
520 "fieldPath": "profileId",
521 "columnName": "profile_id",
522 "affinity": "INTEGER",
527 "columnName": "name",
532 "fieldPath": "value",
533 "columnName": "value",
543 "autoGenerate": false
549 "tableName": "account_values",
550 "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 )",
555 "affinity": "INTEGER",
559 "fieldPath": "accountId",
560 "columnName": "account_id",
561 "affinity": "INTEGER",
565 "fieldPath": "currency",
566 "columnName": "currency",
572 "fieldPath": "value",
573 "columnName": "value",
578 "fieldPath": "generation",
579 "columnName": "generation",
580 "affinity": "INTEGER",
593 "name": "un_account_values",
599 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_account_values` ON `${TABLE_NAME}` (`account_id`, `currency`)"
602 "name": "fk_account_value_acc",
607 "createSql": "CREATE INDEX IF NOT EXISTS `fk_account_value_acc` ON `${TABLE_NAME}` (`account_id`)"
613 "onDelete": "CASCADE",
614 "onUpdate": "RESTRICT",
618 "referencedColumns": [
625 "tableName": "transactions",
626 "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 )",
631 "affinity": "INTEGER",
635 "fieldPath": "ledgerId",
636 "columnName": "ledger_id",
637 "affinity": "INTEGER",
641 "fieldPath": "profileId",
642 "columnName": "profile_id",
643 "affinity": "INTEGER",
647 "fieldPath": "dataHash",
648 "columnName": "data_hash",
654 "columnName": "year",
655 "affinity": "INTEGER",
659 "fieldPath": "month",
660 "columnName": "month",
661 "affinity": "INTEGER",
667 "affinity": "INTEGER",
671 "fieldPath": "description",
672 "columnName": "description",
677 "fieldPath": "descriptionUpper",
678 "columnName": "description_uc",
683 "fieldPath": "comment",
684 "columnName": "comment",
689 "fieldPath": "generation",
690 "columnName": "generation",
691 "affinity": "INTEGER",
703 "name": "un_transactions_ledger_id",
709 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_ledger_id` ON `${TABLE_NAME}` (`profile_id`, `ledger_id`)"
712 "name": "idx_transaction_description",
717 "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
720 "name": "fk_transaction_profile",
725 "createSql": "CREATE INDEX IF NOT EXISTS `fk_transaction_profile` ON `${TABLE_NAME}` (`profile_id`)"
731 "onDelete": "CASCADE",
732 "onUpdate": "RESTRICT",
736 "referencedColumns": [
743 "tableName": "transaction_accounts",
744 "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 )",
749 "affinity": "INTEGER",
753 "fieldPath": "transactionId",
754 "columnName": "transaction_id",
755 "affinity": "INTEGER",
759 "fieldPath": "orderNo",
760 "columnName": "order_no",
761 "affinity": "INTEGER",
765 "fieldPath": "accountName",
766 "columnName": "account_name",
771 "fieldPath": "currency",
772 "columnName": "currency",
778 "fieldPath": "amount",
779 "columnName": "amount",
784 "fieldPath": "comment",
785 "columnName": "comment",
790 "fieldPath": "generation",
791 "columnName": "generation",
792 "affinity": "INTEGER",
805 "name": "fk_trans_acc_trans",
810 "createSql": "CREATE INDEX IF NOT EXISTS `fk_trans_acc_trans` ON `${TABLE_NAME}` (`transaction_id`)"
813 "name": "un_transaction_accounts",
819 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transaction_accounts` ON `${TABLE_NAME}` (`transaction_id`, `order_no`)"
824 "table": "transactions",
825 "onDelete": "CASCADE",
826 "onUpdate": "RESTRICT",
830 "referencedColumns": [
839 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
840 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '69591403d82a378a35d1f22e7e8f637f')"