5 "identityHash": "0f584c8b143be77895cc315ffbc41f3e",
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}` (`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`))",
280 "fieldPath": "level",
281 "columnName": "level",
282 "affinity": "INTEGER",
286 "fieldPath": "profile",
287 "columnName": "profile",
293 "columnName": "name",
298 "fieldPath": "nameUpper",
299 "columnName": "name_upper",
304 "fieldPath": "parentName",
305 "columnName": "parent_name",
310 "fieldPath": "expanded",
311 "columnName": "expanded",
312 "affinity": "INTEGER",
317 "fieldPath": "amountsExpanded",
318 "columnName": "amounts_expanded",
319 "affinity": "INTEGER",
324 "fieldPath": "generation",
325 "columnName": "generation",
326 "affinity": "INTEGER",
336 "autoGenerate": false
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`))",
347 "columnName": "uuid",
353 "columnName": "name",
364 "fieldPath": "useAuthentication",
365 "columnName": "use_authentication",
366 "affinity": "INTEGER",
370 "fieldPath": "authUser",
371 "columnName": "auth_user",
376 "fieldPath": "authPassword",
377 "columnName": "auth_password",
382 "fieldPath": "orderNo",
383 "columnName": "order_no",
384 "affinity": "INTEGER",
388 "fieldPath": "permitPosting",
389 "columnName": "permit_posting",
390 "affinity": "INTEGER",
394 "fieldPath": "theme",
395 "columnName": "theme",
396 "affinity": "INTEGER",
401 "fieldPath": "preferredAccountsFilter",
402 "columnName": "preferred_accounts_filter",
407 "fieldPath": "futureDates",
408 "columnName": "future_dates",
409 "affinity": "INTEGER",
413 "fieldPath": "apiVersion",
414 "columnName": "api_version",
415 "affinity": "INTEGER",
419 "fieldPath": "showCommodityByDefault",
420 "columnName": "show_commodity_by_default",
421 "affinity": "INTEGER",
425 "fieldPath": "defaultCommodity",
426 "columnName": "default_commodity",
431 "fieldPath": "showCommentsByDefault",
432 "columnName": "show_comments_by_default",
433 "affinity": "INTEGER",
438 "fieldPath": "detectedVersionPre_1_19",
439 "columnName": "detected_version_pre_1_19",
440 "affinity": "INTEGER",
444 "fieldPath": "detectedVersionMajor",
445 "columnName": "detected_version_major",
446 "affinity": "INTEGER",
450 "fieldPath": "detectedVersionMinor",
451 "columnName": "detected_version_minor",
452 "affinity": "INTEGER",
460 "autoGenerate": false
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`))",
470 "fieldPath": "profile",
471 "columnName": "profile",
477 "columnName": "name",
482 "fieldPath": "value",
483 "columnName": "value",
493 "autoGenerate": false
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`))",
503 "fieldPath": "profile",
504 "columnName": "profile",
509 "fieldPath": "account",
510 "columnName": "account",
515 "fieldPath": "currency",
516 "columnName": "currency",
522 "fieldPath": "value",
523 "columnName": "value",
528 "fieldPath": "generation",
529 "columnName": "generation",
530 "affinity": "INTEGER",
541 "autoGenerate": false
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`))",
551 "fieldPath": "description",
552 "columnName": "description",
557 "fieldPath": "descriptionUpper",
558 "columnName": "description_upper",
563 "fieldPath": "generation",
564 "columnName": "generation",
565 "affinity": "INTEGER",
574 "autoGenerate": false
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`))",
584 "fieldPath": "profile",
585 "columnName": "profile",
592 "affinity": "INTEGER",
596 "fieldPath": "dataHash",
597 "columnName": "data_hash",
603 "columnName": "year",
604 "affinity": "INTEGER",
608 "fieldPath": "month",
609 "columnName": "month",
610 "affinity": "INTEGER",
616 "affinity": "INTEGER",
620 "fieldPath": "description",
621 "columnName": "description",
626 "fieldPath": "comment",
627 "columnName": "comment",
632 "fieldPath": "generation",
633 "columnName": "generation",
634 "affinity": "INTEGER",
643 "autoGenerate": false
647 "name": "un_transactions_data_hash",
653 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_transactions_data_hash` ON `${TABLE_NAME}` (`profile`, `data_hash`)"
656 "name": "idx_transaction_description",
661 "createSql": "CREATE INDEX IF NOT EXISTS `idx_transaction_description` ON `${TABLE_NAME}` (`description`)"
667 "tableName": "transaction_accounts",
668 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`profile` TEXT 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, PRIMARY KEY(`profile`, `transaction_id`, `order_no`), FOREIGN KEY(`profile`, `transaction_id`) REFERENCES `transactions`(`profile`, `id`) ON UPDATE RESTRICT ON DELETE CASCADE , FOREIGN KEY(`profile`, `account_name`) REFERENCES `accounts`(`profile`, `name`) ON UPDATE RESTRICT ON DELETE CASCADE )",
671 "fieldPath": "profile",
672 "columnName": "profile",
677 "fieldPath": "transactionId",
678 "columnName": "transaction_id",
679 "affinity": "INTEGER",
683 "fieldPath": "orderNo",
684 "columnName": "order_no",
685 "affinity": "INTEGER",
689 "fieldPath": "accountName",
690 "columnName": "account_name",
695 "fieldPath": "currency",
696 "columnName": "currency",
702 "fieldPath": "amount",
703 "columnName": "amount",
708 "fieldPath": "comment",
709 "columnName": "comment",
714 "fieldPath": "generation",
715 "columnName": "generation",
716 "affinity": "INTEGER",
727 "autoGenerate": false
731 "name": "fk_tran_acc_prof_acc",
737 "createSql": "CREATE INDEX IF NOT EXISTS `fk_tran_acc_prof_acc` ON `${TABLE_NAME}` (`profile`, `account_name`)"
742 "table": "transactions",
743 "onDelete": "CASCADE",
744 "onUpdate": "RESTRICT",
749 "referencedColumns": [
756 "onDelete": "CASCADE",
757 "onUpdate": "RESTRICT",
762 "referencedColumns": [
772 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
773 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0f584c8b143be77895cc315ffbc41f3e')"