{ "formatVersion": 1, "database": { "version": 5, "identityHash": "4d290634d6fbf2a1f2dbd0d4f7f78be4", "entities": [ { "tableName": "water_logs", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `amount` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "amount", "columnName": "amount", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "timestamp", "columnName": "timestamp", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "sleep_logs", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `bedTime` TEXT NOT NULL, `wakeTime` TEXT NOT NULL, `duration` REAL NOT NULL, `quality` TEXT NOT NULL, `notes` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "bedTime", "columnName": "bedTime", "affinity": "TEXT", "notNull": true }, { "fieldPath": "wakeTime", "columnName": "wakeTime", "affinity": "TEXT", "notNull": true }, { "fieldPath": "duration", "columnName": "duration", "affinity": "REAL", "notNull": true }, { "fieldPath": "quality", "columnName": "quality", "affinity": "TEXT", "notNull": true }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "workouts", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `type` TEXT NOT NULL, `name` TEXT NOT NULL, `duration` INTEGER NOT NULL, `caloriesBurned` INTEGER NOT NULL, `intensity` TEXT NOT NULL, `notes` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "duration", "columnName": "duration", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "caloriesBurned", "columnName": "caloriesBurned", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "intensity", "columnName": "intensity", "affinity": "TEXT", "notNull": true }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "calories", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `consumed` INTEGER NOT NULL, `burned` INTEGER NOT NULL, `target` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "consumed", "columnName": "consumed", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "burned", "columnName": "burned", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "target", "columnName": "target", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "steps", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `steps` INTEGER NOT NULL, `distance` REAL NOT NULL, `caloriesBurned` INTEGER NOT NULL, `target` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "steps", "columnName": "steps", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "distance", "columnName": "distance", "affinity": "REAL", "notNull": true }, { "fieldPath": "caloriesBurned", "columnName": "caloriesBurned", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "target", "columnName": "target", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "user_profile", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `email` TEXT NOT NULL, `age` INTEGER NOT NULL, `height` INTEGER NOT NULL, `weight` REAL NOT NULL, `targetWeight` REAL NOT NULL, `activityLevel` TEXT NOT NULL, `dailyWaterGoal` INTEGER NOT NULL, `dailyCalorieGoal` INTEGER NOT NULL, `dailyStepsGoal` INTEGER NOT NULL, `cycleLength` INTEGER NOT NULL, `periodLength` INTEGER NOT NULL, `lastPeriodDate` INTEGER, `profileImagePath` TEXT NOT NULL, PRIMARY KEY(`id`))", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "email", "columnName": "email", "affinity": "TEXT", "notNull": true }, { "fieldPath": "age", "columnName": "age", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "height", "columnName": "height", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "weight", "columnName": "weight", "affinity": "REAL", "notNull": true }, { "fieldPath": "targetWeight", "columnName": "targetWeight", "affinity": "REAL", "notNull": true }, { "fieldPath": "activityLevel", "columnName": "activityLevel", "affinity": "TEXT", "notNull": true }, { "fieldPath": "dailyWaterGoal", "columnName": "dailyWaterGoal", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "dailyCalorieGoal", "columnName": "dailyCalorieGoal", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "dailyStepsGoal", "columnName": "dailyStepsGoal", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "cycleLength", "columnName": "cycleLength", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "periodLength", "columnName": "periodLength", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "lastPeriodDate", "columnName": "lastPeriodDate", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "profileImagePath", "columnName": "profileImagePath", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": false, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "WorkoutSession", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `startedAt` INTEGER NOT NULL, `endedAt` INTEGER, `exerciseId` INTEGER NOT NULL, `kcalTotal` REAL, `distanceKm` REAL, `notes` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "startedAt", "columnName": "startedAt", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "endedAt", "columnName": "endedAt", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "exerciseId", "columnName": "exerciseId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "kcalTotal", "columnName": "kcalTotal", "affinity": "REAL", "notNull": false }, { "fieldPath": "distanceKm", "columnName": "distanceKm", "affinity": "REAL", "notNull": false }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_WorkoutSession_startedAt", "unique": false, "columnNames": [ "startedAt" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkoutSession_startedAt` ON `${TABLE_NAME}` (`startedAt`)" } ], "foreignKeys": [] }, { "tableName": "WorkoutSessionParam", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `sessionId` INTEGER NOT NULL, `key` TEXT NOT NULL, `valueNum` REAL, `valueText` TEXT, `unit` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "sessionId", "columnName": "sessionId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "key", "columnName": "key", "affinity": "TEXT", "notNull": true }, { "fieldPath": "valueNum", "columnName": "valueNum", "affinity": "REAL", "notNull": false }, { "fieldPath": "valueText", "columnName": "valueText", "affinity": "TEXT", "notNull": false }, { "fieldPath": "unit", "columnName": "unit", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "WorkoutEvent", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `sessionId` INTEGER NOT NULL, `ts` INTEGER NOT NULL, `eventType` TEXT NOT NULL, `payloadJson` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "sessionId", "columnName": "sessionId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ts", "columnName": "ts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "eventType", "columnName": "eventType", "affinity": "TEXT", "notNull": true }, { "fieldPath": "payloadJson", "columnName": "payloadJson", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "cycle_periods", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `startDate` INTEGER NOT NULL, `endDate` INTEGER, `flow` TEXT NOT NULL, `symptoms` TEXT NOT NULL, `mood` TEXT NOT NULL, `cycleLength` INTEGER)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "startDate", "columnName": "startDate", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "endDate", "columnName": "endDate", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "flow", "columnName": "flow", "affinity": "TEXT", "notNull": true }, { "fieldPath": "symptoms", "columnName": "symptoms", "affinity": "TEXT", "notNull": true }, { "fieldPath": "mood", "columnName": "mood", "affinity": "TEXT", "notNull": true }, { "fieldPath": "cycleLength", "columnName": "cycleLength", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "health_records", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `date` INTEGER NOT NULL, `weight` REAL, `heartRate` INTEGER, `bloodPressureS` INTEGER, `bloodPressureD` INTEGER, `temperature` REAL, `mood` TEXT, `energyLevel` INTEGER, `stressLevel` INTEGER, `symptoms` TEXT, `notes` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "date", "columnName": "date", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "weight", "columnName": "weight", "affinity": "REAL", "notNull": false }, { "fieldPath": "heartRate", "columnName": "heartRate", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "bloodPressureS", "columnName": "bloodPressureS", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "bloodPressureD", "columnName": "bloodPressureD", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "temperature", "columnName": "temperature", "affinity": "REAL", "notNull": false }, { "fieldPath": "mood", "columnName": "mood", "affinity": "TEXT", "notNull": false }, { "fieldPath": "energyLevel", "columnName": "energyLevel", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "stressLevel", "columnName": "stressLevel", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "symptoms", "columnName": "symptoms", "affinity": "TEXT", "notNull": false }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "cycle_settings", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `baselineCycleLength` INTEGER NOT NULL, `cycleVariabilityDays` INTEGER NOT NULL, `periodLengthDays` INTEGER NOT NULL, `lutealPhaseDays` TEXT NOT NULL, `lastPeriodStart` INTEGER, `ovulationMethod` TEXT NOT NULL, `allowManualOvulation` INTEGER NOT NULL, `hormonalContraception` TEXT NOT NULL, `isPregnant` INTEGER NOT NULL, `isPostpartum` INTEGER NOT NULL, `isLactating` INTEGER NOT NULL, `perimenopause` INTEGER NOT NULL, `historyWindowCycles` INTEGER NOT NULL, `excludeOutliers` INTEGER NOT NULL, `tempUnit` TEXT NOT NULL, `bbtTimeWindow` TEXT NOT NULL, `timezone` TEXT NOT NULL, `periodReminderDaysBefore` INTEGER NOT NULL, `ovulationReminderDaysBefore` INTEGER NOT NULL, `pmsWindowDays` INTEGER NOT NULL, `deviationAlertDays` INTEGER NOT NULL, `fertileWindowMode` TEXT NOT NULL, PRIMARY KEY(`id`))", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "baselineCycleLength", "columnName": "baselineCycleLength", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "cycleVariabilityDays", "columnName": "cycleVariabilityDays", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "periodLengthDays", "columnName": "periodLengthDays", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "lutealPhaseDays", "columnName": "lutealPhaseDays", "affinity": "TEXT", "notNull": true }, { "fieldPath": "lastPeriodStart", "columnName": "lastPeriodStart", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "ovulationMethod", "columnName": "ovulationMethod", "affinity": "TEXT", "notNull": true }, { "fieldPath": "allowManualOvulation", "columnName": "allowManualOvulation", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "hormonalContraception", "columnName": "hormonalContraception", "affinity": "TEXT", "notNull": true }, { "fieldPath": "isPregnant", "columnName": "isPregnant", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "isPostpartum", "columnName": "isPostpartum", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "isLactating", "columnName": "isLactating", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "perimenopause", "columnName": "perimenopause", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "historyWindowCycles", "columnName": "historyWindowCycles", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "excludeOutliers", "columnName": "excludeOutliers", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "tempUnit", "columnName": "tempUnit", "affinity": "TEXT", "notNull": true }, { "fieldPath": "bbtTimeWindow", "columnName": "bbtTimeWindow", "affinity": "TEXT", "notNull": true }, { "fieldPath": "timezone", "columnName": "timezone", "affinity": "TEXT", "notNull": true }, { "fieldPath": "periodReminderDaysBefore", "columnName": "periodReminderDaysBefore", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ovulationReminderDaysBefore", "columnName": "ovulationReminderDaysBefore", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "pmsWindowDays", "columnName": "pmsWindowDays", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "deviationAlertDays", "columnName": "deviationAlertDays", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "fertileWindowMode", "columnName": "fertileWindowMode", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": false, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "cycle_history", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `periodStart` INTEGER NOT NULL, `periodEnd` INTEGER, `ovulationDate` INTEGER, `notes` TEXT NOT NULL, `atypical` INTEGER NOT NULL, `flow` TEXT NOT NULL, `symptoms` TEXT NOT NULL, `mood` TEXT NOT NULL, `cycleLength` INTEGER)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "periodStart", "columnName": "periodStart", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "periodEnd", "columnName": "periodEnd", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "ovulationDate", "columnName": "ovulationDate", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": true }, { "fieldPath": "atypical", "columnName": "atypical", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "flow", "columnName": "flow", "affinity": "TEXT", "notNull": true }, { "fieldPath": "symptoms", "columnName": "symptoms", "affinity": "TEXT", "notNull": true }, { "fieldPath": "mood", "columnName": "mood", "affinity": "TEXT", "notNull": true }, { "fieldPath": "cycleLength", "columnName": "cycleLength", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_cycle_history_periodStart", "unique": true, "columnNames": [ "periodStart" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_cycle_history_periodStart` ON `${TABLE_NAME}` (`periodStart`)" } ], "foreignKeys": [] }, { "tableName": "cycle_forecast", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `nextPeriodStart` INTEGER, `nextOvulation` INTEGER, `fertileStart` INTEGER, `fertileEnd` INTEGER, `pmsStart` INTEGER, `updatedAt` INTEGER NOT NULL, `isReliable` INTEGER NOT NULL, PRIMARY KEY(`id`))", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "nextPeriodStart", "columnName": "nextPeriodStart", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "nextOvulation", "columnName": "nextOvulation", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "fertileStart", "columnName": "fertileStart", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "fertileEnd", "columnName": "fertileEnd", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "pmsStart", "columnName": "pmsStart", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "updatedAt", "columnName": "updatedAt", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "isReliable", "columnName": "isReliable", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": false, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "Nutrient", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `code` TEXT NOT NULL, `name` TEXT NOT NULL, `unit` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "code", "columnName": "code", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "unit", "columnName": "unit", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_Nutrient_code", "unique": true, "columnNames": [ "code" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_Nutrient_code` ON `${TABLE_NAME}` (`code`)" } ], "foreignKeys": [] }, { "tableName": "Beverage", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `brand` TEXT, `category` TEXT NOT NULL, `source` TEXT NOT NULL, `sourceRef` TEXT NOT NULL, `isCaffeinated` INTEGER NOT NULL, `isSweetened` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "brand", "columnName": "brand", "affinity": "TEXT", "notNull": false }, { "fieldPath": "category", "columnName": "category", "affinity": "TEXT", "notNull": true }, { "fieldPath": "source", "columnName": "source", "affinity": "TEXT", "notNull": true }, { "fieldPath": "sourceRef", "columnName": "sourceRef", "affinity": "TEXT", "notNull": true }, { "fieldPath": "isCaffeinated", "columnName": "isCaffeinated", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "isSweetened", "columnName": "isSweetened", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "createdAt", "columnName": "createdAt", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "BeverageServing", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `beverageId` INTEGER NOT NULL, `label` TEXT NOT NULL, `volumeMl` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "beverageId", "columnName": "beverageId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "label", "columnName": "label", "affinity": "TEXT", "notNull": true }, { "fieldPath": "volumeMl", "columnName": "volumeMl", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "BeverageServingNutrient", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `servingId` INTEGER NOT NULL, `nutrientId` INTEGER NOT NULL, `amountPerServing` REAL NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "servingId", "columnName": "servingId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "nutrientId", "columnName": "nutrientId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "amountPerServing", "columnName": "amountPerServing", "affinity": "REAL", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "WaterLog", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `ts` INTEGER NOT NULL, `volumeMl` INTEGER NOT NULL, `source` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ts", "columnName": "ts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "volumeMl", "columnName": "volumeMl", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "source", "columnName": "source", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_WaterLog_ts", "unique": false, "columnNames": [ "ts" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_WaterLog_ts` ON `${TABLE_NAME}` (`ts`)" } ], "foreignKeys": [] }, { "tableName": "BeverageLog", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `ts` INTEGER NOT NULL, `beverageId` INTEGER NOT NULL, `servingId` INTEGER NOT NULL, `servingsCount` INTEGER NOT NULL, `notes` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ts", "columnName": "ts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "beverageId", "columnName": "beverageId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "servingId", "columnName": "servingId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "servingsCount", "columnName": "servingsCount", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_BeverageLog_ts", "unique": false, "columnNames": [ "ts" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_BeverageLog_ts` ON `${TABLE_NAME}` (`ts`)" } ], "foreignKeys": [] }, { "tableName": "BeverageLogNutrient", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `beverageLogId` INTEGER NOT NULL, `nutrientId` INTEGER NOT NULL, `amountTotal` REAL NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "beverageLogId", "columnName": "beverageLogId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "nutrientId", "columnName": "nutrientId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "amountTotal", "columnName": "amountTotal", "affinity": "REAL", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "WeightLog", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `ts` INTEGER NOT NULL, `weightKg` REAL NOT NULL, `source` TEXT NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "ts", "columnName": "ts", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "weightKg", "columnName": "weightKg", "affinity": "REAL", "notNull": true }, { "fieldPath": "source", "columnName": "source", "affinity": "TEXT", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_WeightLog_ts", "unique": false, "columnNames": [ "ts" ], "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_WeightLog_ts` ON `${TABLE_NAME}` (`ts`)" } ], "foreignKeys": [] }, { "tableName": "Exercise", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `category` TEXT NOT NULL, `description` TEXT, `metValue` REAL, `source` TEXT NOT NULL, `sourceRef` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "category", "columnName": "category", "affinity": "TEXT", "notNull": true }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": false }, { "fieldPath": "metValue", "columnName": "metValue", "affinity": "REAL", "notNull": false }, { "fieldPath": "source", "columnName": "source", "affinity": "TEXT", "notNull": true }, { "fieldPath": "sourceRef", "columnName": "sourceRef", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "ExerciseParam", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `exerciseId` INTEGER NOT NULL, `key` TEXT NOT NULL, `valueType` TEXT NOT NULL, `unit` TEXT, `required` INTEGER NOT NULL, `defaultValue` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "exerciseId", "columnName": "exerciseId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "key", "columnName": "key", "affinity": "TEXT", "notNull": true }, { "fieldPath": "valueType", "columnName": "valueType", "affinity": "TEXT", "notNull": true }, { "fieldPath": "unit", "columnName": "unit", "affinity": "TEXT", "notNull": false }, { "fieldPath": "required", "columnName": "required", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "defaultValue", "columnName": "defaultValue", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "ExerciseFormula", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `exerciseId` INTEGER NOT NULL, `name` TEXT NOT NULL, `exprKcal` TEXT NOT NULL, `notes` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "exerciseId", "columnName": "exerciseId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "exprKcal", "columnName": "exprKcal", "affinity": "TEXT", "notNull": true }, { "fieldPath": "notes", "columnName": "notes", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "ExerciseFormulaVar", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `formulaId` INTEGER NOT NULL, `varKey` TEXT NOT NULL, `required` INTEGER NOT NULL, `unit` TEXT)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "formulaId", "columnName": "formulaId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "varKey", "columnName": "varKey", "affinity": "TEXT", "notNull": true }, { "fieldPath": "required", "columnName": "required", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "unit", "columnName": "unit", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [], "foreignKeys": [] }, { "tableName": "CatalogVersion", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `localVersion` INTEGER NOT NULL, `source` TEXT NOT NULL, `lastSyncAt` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", "columnName": "id", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "localVersion", "columnName": "localVersion", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "source", "columnName": "source", "affinity": "TEXT", "notNull": true }, { "fieldPath": "lastSyncAt", "columnName": "lastSyncAt", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "autoGenerate": true, "columnNames": [ "id" ] }, "indices": [ { "name": "index_CatalogVersion_source", "unique": true, "columnNames": [ "source" ], "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_CatalogVersion_source` ON `${TABLE_NAME}` (`source`)" } ], "foreignKeys": [] } ], "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '4d290634d6fbf2a1f2dbd0d4f7f78be4')" ] } }