]> git.ktnx.net Git - mobile-ledger.git/blob - app/schemas/net.ktnx.mobileledger.db.DB/52.json
no need for gravity, only one edge is constrained anyway
[mobile-ledger.git] / app / schemas / net.ktnx.mobileledger.db.DB / 52.json
1 {
2   "formatVersion": 1,
3   "database": {
4     "version": 52,
5     "identityHash": "d80c63258c511ee305dc5f0062a8af2a",
6     "entities": [
7       {
8         "tableName": "patterns",
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)",
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         "primaryKey": {
97           "columnNames": [
98             "id"
99           ],
100           "autoGenerate": true
101         },
102         "indices": [
103           {
104             "name": "un_patterns_id",
105             "unique": true,
106             "columnNames": [
107               "id"
108             ],
109             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_patterns_id` ON `${TABLE_NAME}` (`id`)"
110           }
111         ],
112         "foreignKeys": []
113       },
114       {
115         "tableName": "pattern_accounts",
116         "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`pattern_id` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT 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, FOREIGN KEY(`pattern_id`) REFERENCES `patterns`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION , FOREIGN KEY(`currency`) REFERENCES `currencies`(`id`) ON UPDATE NO ACTION ON DELETE NO ACTION )",
117         "fields": [
118           {
119             "fieldPath": "patternId",
120             "columnName": "pattern_id",
121             "affinity": "INTEGER",
122             "notNull": true
123           },
124           {
125             "fieldPath": "id",
126             "columnName": "id",
127             "affinity": "INTEGER",
128             "notNull": true
129           },
130           {
131             "fieldPath": "accountName",
132             "columnName": "acc",
133             "affinity": "TEXT",
134             "notNull": false
135           },
136           {
137             "fieldPath": "position",
138             "columnName": "position",
139             "affinity": "INTEGER",
140             "notNull": true
141           },
142           {
143             "fieldPath": "accountNameMatchGroup",
144             "columnName": "acc_match_group",
145             "affinity": "INTEGER",
146             "notNull": false
147           },
148           {
149             "fieldPath": "currency",
150             "columnName": "currency",
151             "affinity": "INTEGER",
152             "notNull": false
153           },
154           {
155             "fieldPath": "currencyMatchGroup",
156             "columnName": "currency_match_group",
157             "affinity": "INTEGER",
158             "notNull": false
159           },
160           {
161             "fieldPath": "amount",
162             "columnName": "amount",
163             "affinity": "REAL",
164             "notNull": false
165           },
166           {
167             "fieldPath": "amountMatchGroup",
168             "columnName": "amount_match_group",
169             "affinity": "INTEGER",
170             "notNull": false
171           },
172           {
173             "fieldPath": "accountComment",
174             "columnName": "comment",
175             "affinity": "TEXT",
176             "notNull": false
177           },
178           {
179             "fieldPath": "accountCommentMatchGroup",
180             "columnName": "comment_match_group",
181             "affinity": "INTEGER",
182             "notNull": false
183           }
184         ],
185         "primaryKey": {
186           "columnNames": [
187             "id"
188           ],
189           "autoGenerate": true
190         },
191         "indices": [
192           {
193             "name": "un_pattern_accounts",
194             "unique": true,
195             "columnNames": [
196               "id"
197             ],
198             "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `un_pattern_accounts` ON `${TABLE_NAME}` (`id`)"
199           },
200           {
201             "name": "fk_pattern_accounts_pattern",
202             "unique": false,
203             "columnNames": [
204               "pattern_id"
205             ],
206             "createSql": "CREATE INDEX IF NOT EXISTS `fk_pattern_accounts_pattern` ON `${TABLE_NAME}` (`pattern_id`)"
207           },
208           {
209             "name": "fk_pattern_accounts_currency",
210             "unique": false,
211             "columnNames": [
212               "currency"
213             ],
214             "createSql": "CREATE INDEX IF NOT EXISTS `fk_pattern_accounts_currency` ON `${TABLE_NAME}` (`currency`)"
215           }
216         ],
217         "foreignKeys": [
218           {
219             "table": "patterns",
220             "onDelete": "NO ACTION",
221             "onUpdate": "NO ACTION",
222             "columns": [
223               "pattern_id"
224             ],
225             "referencedColumns": [
226               "id"
227             ]
228           },
229           {
230             "table": "currencies",
231             "onDelete": "NO ACTION",
232             "onUpdate": "NO ACTION",
233             "columns": [
234               "currency"
235             ],
236             "referencedColumns": [
237               "id"
238             ]
239           }
240         ]
241       },
242       {
243         "tableName": "currencies",
244         "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)",
245         "fields": [
246           {
247             "fieldPath": "id",
248             "columnName": "id",
249             "affinity": "INTEGER",
250             "notNull": true
251           },
252           {
253             "fieldPath": "name",
254             "columnName": "name",
255             "affinity": "TEXT",
256             "notNull": true
257           },
258           {
259             "fieldPath": "position",
260             "columnName": "position",
261             "affinity": "TEXT",
262             "notNull": true
263           },
264           {
265             "fieldPath": "hasGap",
266             "columnName": "has_gap",
267             "affinity": "INTEGER",
268             "notNull": true
269           }
270         ],
271         "primaryKey": {
272           "columnNames": [
273             "id"
274           ],
275           "autoGenerate": true
276         },
277         "indices": [],
278         "foreignKeys": []
279       }
280     ],
281     "views": [],
282     "setupQueries": [
283       "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
284       "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd80c63258c511ee305dc5f0062a8af2a')"
285     ]
286   }
287 }