1{ 2 "formatVersion": 1, 3 "database": { 4 "version": 2, 5 "identityHash": "d7163af8ae7dd3e04fc0fb3cdc3ad6ad", 6 "entities": [ 7 { 8 "tableName": "AggregateStore", 9 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`day_index` INTEGER NOT NULL, `event_vector` TEXT NOT NULL, `system_profile_hash` INTEGER NOT NULL, `aggregate_value` BLOB NOT NULL, `customer_id` INTEGER NOT NULL, `project_id` INTEGER NOT NULL, `metric_id` INTEGER NOT NULL, `report_id` INTEGER NOT NULL, PRIMARY KEY(`customer_id`, `project_id`, `metric_id`, `report_id`, `day_index`, `system_profile_hash`, `event_vector`), FOREIGN KEY(`customer_id`, `project_id`, `metric_id`, `report_id`) REFERENCES `Reports`(`customer_id`, `project_id`, `metric_id`, `report_id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`system_profile_hash`) REFERENCES `SystemProfiles`(`system_profile_hash`) ON UPDATE NO ACTION ON DELETE NO ACTION )", 10 "fields": [ 11 { 12 "fieldPath": "dayIndex", 13 "columnName": "day_index", 14 "affinity": "INTEGER", 15 "notNull": true 16 }, 17 { 18 "fieldPath": "eventVector", 19 "columnName": "event_vector", 20 "affinity": "TEXT", 21 "notNull": true 22 }, 23 { 24 "fieldPath": "systemProfileHash", 25 "columnName": "system_profile_hash", 26 "affinity": "INTEGER", 27 "notNull": true 28 }, 29 { 30 "fieldPath": "aggregateValue", 31 "columnName": "aggregate_value", 32 "affinity": "BLOB", 33 "notNull": true 34 }, 35 { 36 "fieldPath": "reportKey.customerId", 37 "columnName": "customer_id", 38 "affinity": "INTEGER", 39 "notNull": true 40 }, 41 { 42 "fieldPath": "reportKey.projectId", 43 "columnName": "project_id", 44 "affinity": "INTEGER", 45 "notNull": true 46 }, 47 { 48 "fieldPath": "reportKey.metricId", 49 "columnName": "metric_id", 50 "affinity": "INTEGER", 51 "notNull": true 52 }, 53 { 54 "fieldPath": "reportKey.reportId", 55 "columnName": "report_id", 56 "affinity": "INTEGER", 57 "notNull": true 58 } 59 ], 60 "primaryKey": { 61 "autoGenerate": false, 62 "columnNames": [ 63 "customer_id", 64 "project_id", 65 "metric_id", 66 "report_id", 67 "day_index", 68 "system_profile_hash", 69 "event_vector" 70 ] 71 }, 72 "indices": [ 73 { 74 "name": "index_AggregateStore_system_profile_hash", 75 "unique": false, 76 "columnNames": [ 77 "system_profile_hash" 78 ], 79 "orders": [], 80 "createSql": "CREATE INDEX IF NOT EXISTS `index_AggregateStore_system_profile_hash` ON `${TABLE_NAME}` (`system_profile_hash`)" 81 } 82 ], 83 "foreignKeys": [ 84 { 85 "table": "Reports", 86 "onDelete": "CASCADE", 87 "onUpdate": "NO ACTION", 88 "columns": [ 89 "customer_id", 90 "project_id", 91 "metric_id", 92 "report_id" 93 ], 94 "referencedColumns": [ 95 "customer_id", 96 "project_id", 97 "metric_id", 98 "report_id" 99 ] 100 }, 101 { 102 "table": "SystemProfiles", 103 "onDelete": "NO ACTION", 104 "onUpdate": "NO ACTION", 105 "columns": [ 106 "system_profile_hash" 107 ], 108 "referencedColumns": [ 109 "system_profile_hash" 110 ] 111 } 112 ] 113 }, 114 { 115 "tableName": "GlobalValues", 116 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`key`))", 117 "fields": [ 118 { 119 "fieldPath": "key", 120 "columnName": "key", 121 "affinity": "TEXT", 122 "notNull": true 123 }, 124 { 125 "fieldPath": "value", 126 "columnName": "value", 127 "affinity": "TEXT", 128 "notNull": true 129 } 130 ], 131 "primaryKey": { 132 "autoGenerate": false, 133 "columnNames": [ 134 "key" 135 ] 136 }, 137 "indices": [], 138 "foreignKeys": [] 139 }, 140 { 141 "tableName": "ObservationStore", 142 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`observation_store_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `unencrypted_observation_batch` BLOB NOT NULL)", 143 "fields": [ 144 { 145 "fieldPath": "observationStoreId", 146 "columnName": "observation_store_id", 147 "affinity": "INTEGER", 148 "notNull": true 149 }, 150 { 151 "fieldPath": "unencryptedObservationBatch", 152 "columnName": "unencrypted_observation_batch", 153 "affinity": "BLOB", 154 "notNull": true 155 } 156 ], 157 "primaryKey": { 158 "autoGenerate": true, 159 "columnNames": [ 160 "observation_store_id" 161 ] 162 }, 163 "indices": [], 164 "foreignKeys": [] 165 }, 166 { 167 "tableName": "Reports", 168 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`last_sent_day_index` INTEGER, `customer_id` INTEGER NOT NULL, `project_id` INTEGER NOT NULL, `metric_id` INTEGER NOT NULL, `report_id` INTEGER NOT NULL, PRIMARY KEY(`customer_id`, `project_id`, `metric_id`, `report_id`))", 169 "fields": [ 170 { 171 "fieldPath": "lastSentDayIndex", 172 "columnName": "last_sent_day_index", 173 "affinity": "INTEGER", 174 "notNull": false 175 }, 176 { 177 "fieldPath": "reportKey.customerId", 178 "columnName": "customer_id", 179 "affinity": "INTEGER", 180 "notNull": true 181 }, 182 { 183 "fieldPath": "reportKey.projectId", 184 "columnName": "project_id", 185 "affinity": "INTEGER", 186 "notNull": true 187 }, 188 { 189 "fieldPath": "reportKey.metricId", 190 "columnName": "metric_id", 191 "affinity": "INTEGER", 192 "notNull": true 193 }, 194 { 195 "fieldPath": "reportKey.reportId", 196 "columnName": "report_id", 197 "affinity": "INTEGER", 198 "notNull": true 199 } 200 ], 201 "primaryKey": { 202 "autoGenerate": false, 203 "columnNames": [ 204 "customer_id", 205 "project_id", 206 "metric_id", 207 "report_id" 208 ] 209 }, 210 "indices": [], 211 "foreignKeys": [] 212 }, 213 { 214 "tableName": "SystemProfiles", 215 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`system_profile_hash` INTEGER NOT NULL, `system_profile` BLOB NOT NULL, PRIMARY KEY(`system_profile_hash`))", 216 "fields": [ 217 { 218 "fieldPath": "systemProfileHash", 219 "columnName": "system_profile_hash", 220 "affinity": "INTEGER", 221 "notNull": true 222 }, 223 { 224 "fieldPath": "systemProfile", 225 "columnName": "system_profile", 226 "affinity": "BLOB", 227 "notNull": true 228 } 229 ], 230 "primaryKey": { 231 "autoGenerate": false, 232 "columnNames": [ 233 "system_profile_hash" 234 ] 235 }, 236 "indices": [], 237 "foreignKeys": [] 238 }, 239 { 240 "tableName": "StringHashes", 241 "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`day_index` INTEGER NOT NULL, `list_index` INTEGER NOT NULL, `string_hash` BLOB NOT NULL, `customer_id` INTEGER NOT NULL, `project_id` INTEGER NOT NULL, `metric_id` INTEGER NOT NULL, `report_id` INTEGER NOT NULL, PRIMARY KEY(`customer_id`, `project_id`, `metric_id`, `report_id`, `day_index`, `list_index`))", 242 "fields": [ 243 { 244 "fieldPath": "dayIndex", 245 "columnName": "day_index", 246 "affinity": "INTEGER", 247 "notNull": true 248 }, 249 { 250 "fieldPath": "listIndex", 251 "columnName": "list_index", 252 "affinity": "INTEGER", 253 "notNull": true 254 }, 255 { 256 "fieldPath": "stringHash", 257 "columnName": "string_hash", 258 "affinity": "BLOB", 259 "notNull": true 260 }, 261 { 262 "fieldPath": "reportKey.customerId", 263 "columnName": "customer_id", 264 "affinity": "INTEGER", 265 "notNull": true 266 }, 267 { 268 "fieldPath": "reportKey.projectId", 269 "columnName": "project_id", 270 "affinity": "INTEGER", 271 "notNull": true 272 }, 273 { 274 "fieldPath": "reportKey.metricId", 275 "columnName": "metric_id", 276 "affinity": "INTEGER", 277 "notNull": true 278 }, 279 { 280 "fieldPath": "reportKey.reportId", 281 "columnName": "report_id", 282 "affinity": "INTEGER", 283 "notNull": true 284 } 285 ], 286 "primaryKey": { 287 "autoGenerate": false, 288 "columnNames": [ 289 "customer_id", 290 "project_id", 291 "metric_id", 292 "report_id", 293 "day_index", 294 "list_index" 295 ] 296 }, 297 "indices": [ 298 { 299 "name": "index_StringHashes_customer_id_project_id_metric_id_report_id_day_index_string_hash", 300 "unique": true, 301 "columnNames": [ 302 "customer_id", 303 "project_id", 304 "metric_id", 305 "report_id", 306 "day_index", 307 "string_hash" 308 ], 309 "orders": [], 310 "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_StringHashes_customer_id_project_id_metric_id_report_id_day_index_string_hash` ON `${TABLE_NAME}` (`customer_id`, `project_id`, `metric_id`, `report_id`, `day_index`, `string_hash`)" 311 } 312 ], 313 "foreignKeys": [] 314 } 315 ], 316 "views": [], 317 "setupQueries": [ 318 "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", 319 "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd7163af8ae7dd3e04fc0fb3cdc3ad6ad')" 320 ] 321 } 322}