diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/10.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/10.json deleted file mode 100644 index f8366e1e6c..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/10.json +++ /dev/null @@ -1,513 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 10, - "identityHash": "2b7afab8cf565ea868c33c68cabf81f0", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL, `defaultOrder` INTEGER NOT NULL, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL, `isSpotlight` INTEGER NOT NULL, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '2b7afab8cf565ea868c33c68cabf81f0')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/11.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/11.json deleted file mode 100644 index 88b4465ac3..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/11.json +++ /dev/null @@ -1,649 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 11, - "identityHash": "0c7f603011ef1c8cf73c54377464a52f", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL, `defaultOrder` INTEGER NOT NULL, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL, `isSpotlight` INTEGER NOT NULL, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '0c7f603011ef1c8cf73c54377464a52f')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/12.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/12.json deleted file mode 100644 index 332faf6006..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/12.json +++ /dev/null @@ -1,656 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 12, - "identityHash": "9f36dbda310b82c3adbbb969d2c20c9e", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL, `defaultOrder` INTEGER NOT NULL, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL, `isSpotlight` INTEGER NOT NULL, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '9f36dbda310b82c3adbbb969d2c20c9e')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/13.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/13.json deleted file mode 100644 index 3da6df3be0..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/13.json +++ /dev/null @@ -1,661 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 13, - "identityHash": "c2eafd68c417479ddde50785d422f013", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, 'c2eafd68c417479ddde50785d422f013')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/14.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/14.json deleted file mode 100644 index 29bc95f55c..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/14.json +++ /dev/null @@ -1,661 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 14, - "identityHash": "61b9f620ca5749cf1e85d2e93b08fdcf", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '61b9f620ca5749cf1e85d2e93b08fdcf')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/15.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/15.json deleted file mode 100644 index 07d793482e..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/15.json +++ /dev/null @@ -1,668 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 15, - "identityHash": "9334f5fbc202b319d6b690c3c809c1ca", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '9334f5fbc202b319d6b690c3c809c1ca')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/16.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/16.json deleted file mode 100644 index 969b864bec..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/16.json +++ /dev/null @@ -1,686 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 16, - "identityHash": "24e9df6ade2763e59a618668caa26a9b", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '24e9df6ade2763e59a618668caa26a9b')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/17.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/17.json deleted file mode 100644 index caecb089df..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/17.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 17, - "identityHash": "288e0515f2cf370e063ab9462736a6af", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, `isInitialFavoriteToolsSynced` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isInitialFavoriteToolsSynced", - "columnName": "isInitialFavoriteToolsSynced", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '288e0515f2cf370e063ab9462736a6af')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/18.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/18.json deleted file mode 100644 index f0ecc7263d..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/18.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 18, - "identityHash": "af6a0bc236a51dcc56b3473b0b9a322a", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, `isInitialFavoriteToolsSynced` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isInitialFavoriteToolsSynced", - "columnName": "isInitialFavoriteToolsSynced", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, 'af6a0bc236a51dcc56b3473b0b9a322a')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/19.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/19.json deleted file mode 100644 index 77f4556808..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/19.json +++ /dev/null @@ -1,693 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 19, - "identityHash": "aa77202e5e638c6d8df2c6d370bc1cb3", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, `isInitialFavoriteToolsSynced` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isInitialFavoriteToolsSynced", - "columnName": "isInitialFavoriteToolsSynced", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, 'aa77202e5e638c6d8df2c6d370bc1cb3')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/20.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/20.json deleted file mode 100644 index 21d34eefaa..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/20.json +++ /dev/null @@ -1,720 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 20, - "identityHash": "331b8aa77df342da38b633780f65b439", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedTranslationFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`translationId` INTEGER NOT NULL, `filename` TEXT NOT NULL, PRIMARY KEY(`translationId`, `filename`))", - "fields": [ - { - "fieldPath": "key.translationId", - "columnName": "translationId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "translationId", - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, `isInitialFavoriteToolsSynced` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isInitialFavoriteToolsSynced", - "columnName": "isInitialFavoriteToolsSynced", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '331b8aa77df342da38b633780f65b439')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/21.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/21.json deleted file mode 100644 index 8af75bee70..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/21.json +++ /dev/null @@ -1,727 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 21, - "identityHash": "bf3559488761d7b47a298aec41de8f56", - "entities": [ - { - "tableName": "attachments", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT, `filename` TEXT, `sha256` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "sha256", - "columnName": "sha256", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_attachments_tool", - "unique": false, - "columnNames": [ - "tool" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_attachments_tool` ON `${TABLE_NAME}` (`tool`)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `name` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedTranslationFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`translationId` INTEGER NOT NULL, `filename` TEXT NOT NULL, PRIMARY KEY(`translationId`, `filename`))", - "fields": [ - { - "fieldPath": "key.translationId", - "columnName": "translationId", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "translationId", - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL DEFAULT 0, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL DEFAULT false, `defaultLocale` TEXT NOT NULL DEFAULT 'en', `defaultOrder` INTEGER NOT NULL DEFAULT 0, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isFavorite` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL DEFAULT false, `isSpotlight` INTEGER NOT NULL DEFAULT false, `changedFields` TEXT NOT NULL DEFAULT '', `apiId` INTEGER, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "defaultLocale", - "columnName": "defaultLocale", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "'en'" - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isFavorite", - "columnName": "isFavorite", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "changedFields", - "columnName": "changedFields", - "affinity": "TEXT", - "notNull": true, - "defaultValue": "''" - }, - { - "fieldPath": "apiId", - "columnName": "apiId", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "translations", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `version` INTEGER NOT NULL, `name` TEXT, `description` TEXT, `tagline` TEXT, `toolDetailsConversationStarters` TEXT, `toolDetailsOutline` TEXT, `toolDetailsBibleReferences` TEXT, `manifestFileName` TEXT, `isDownloaded` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`), FOREIGN KEY(`tool`) REFERENCES `tools`(`code`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`locale`) REFERENCES `languages`(`code`) ON UPDATE CASCADE ON DELETE CASCADE )", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "version", - "columnName": "version", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "tagline", - "columnName": "tagline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsConversationStarters", - "columnName": "toolDetailsConversationStarters", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsOutline", - "columnName": "toolDetailsOutline", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "toolDetailsBibleReferences", - "columnName": "toolDetailsBibleReferences", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "manifestFileName", - "columnName": "manifestFileName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDownloaded", - "columnName": "isDownloaded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [ - { - "name": "index_translations_tool_locale", - "unique": false, - "columnNames": [ - "tool", - "locale" - ], - "orders": [], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale` ON `${TABLE_NAME}` (`tool`, `locale`)" - }, - { - "name": "index_translations_tool_locale_version", - "unique": false, - "columnNames": [ - "tool", - "locale", - "version" - ], - "orders": [ - "ASC", - "ASC", - "DESC" - ], - "createSql": "CREATE INDEX IF NOT EXISTS `index_translations_tool_locale_version` ON `${TABLE_NAME}` (`tool` ASC, `locale` ASC, `version` DESC)" - } - ], - "foreignKeys": [ - { - "table": "tools", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "tool" - ], - "referencedColumns": [ - "code" - ] - }, - { - "table": "languages", - "onDelete": "CASCADE", - "onUpdate": "CASCADE", - "columns": [ - "locale" - ], - "referencedColumns": [ - "code" - ] - } - ] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `givenName` TEXT, `familyName` TEXT, `email` TEXT, `createdAt` INTEGER, `isInitialFavoriteToolsSynced` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "givenName", - "columnName": "givenName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "familyName", - "columnName": "familyName", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "isInitialFavoriteToolsSynced", - "columnName": "isInitialFavoriteToolsSynced", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, 'bf3559488761d7b47a298aec41de8f56')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/6.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/6.json deleted file mode 100644 index 969762e539..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/6.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 6, - "identityHash": "546f68fb4f7b431d1e0c2512029ba5fd", - "entities": [ - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "code" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": true - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "tool", - "locale", - "tipId" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "columnNames": [ - "name" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "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, '546f68fb4f7b431d1e0c2512029ba5fd')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/8.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/8.json deleted file mode 100644 index 2477e63c53..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/8.json +++ /dev/null @@ -1,309 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 8, - "identityHash": "377066d3767333d86e67ece932003acf", - "entities": [ - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '377066d3767333d86e67ece932003acf')" - ] - } -} \ No newline at end of file diff --git a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/9.json b/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/9.json deleted file mode 100644 index 3ef408e141..0000000000 --- a/library/db/room-schemas/org.cru.godtools.db.room.GodToolsRoomDatabase/9.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "formatVersion": 1, - "database": { - "version": 9, - "identityHash": "128676e0b58be0450281eda29dee40ff", - "entities": [ - { - "tableName": "languages", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`code` TEXT NOT NULL, `id` INTEGER NOT NULL, `name` TEXT, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "downloadedFiles", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`filename` TEXT NOT NULL, PRIMARY KEY(`filename`))", - "fields": [ - { - "fieldPath": "filename", - "columnName": "filename", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "filename" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "followups", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `email` TEXT NOT NULL, `destination` INTEGER NOT NULL, `language` TEXT NOT NULL, `createdAt` INTEGER NOT NULL)", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "email", - "columnName": "email", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "destination", - "columnName": "destination", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "language", - "columnName": "language", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": true, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "global_activity", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`users` INTEGER NOT NULL, `countries` INTEGER NOT NULL, `launches` INTEGER NOT NULL, `gospelPresentations` INTEGER NOT NULL, `id` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "users", - "columnName": "users", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "countries", - "columnName": "countries", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "launches", - "columnName": "launches", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "gospelPresentations", - "columnName": "gospelPresentations", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "tools", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `code` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT, `category` TEXT, `description` TEXT, `shares` INTEGER NOT NULL, `pendingShares` INTEGER NOT NULL DEFAULT 0, `bannerId` INTEGER, `detailsBannerId` INTEGER, `detailsBannerAnimationId` INTEGER, `detailsBannerYoutubeVideoId` TEXT, `isScreenShareDisabled` INTEGER NOT NULL, `defaultOrder` INTEGER NOT NULL, `order` INTEGER NOT NULL DEFAULT 2147483647, `metatoolCode` TEXT, `defaultVariantCode` TEXT, `isAdded` INTEGER NOT NULL DEFAULT false, `isHidden` INTEGER NOT NULL, `isSpotlight` INTEGER NOT NULL, PRIMARY KEY(`code`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "code", - "columnName": "code", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "type", - "columnName": "type", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "category", - "columnName": "category", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "description", - "columnName": "description", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "shares", - "columnName": "shares", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "pendingShares", - "columnName": "pendingShares", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - }, - { - "fieldPath": "bannerId", - "columnName": "bannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerId", - "columnName": "detailsBannerId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerAnimationId", - "columnName": "detailsBannerAnimationId", - "affinity": "INTEGER", - "notNull": false - }, - { - "fieldPath": "detailsBannerYoutubeVideoId", - "columnName": "detailsBannerYoutubeVideoId", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isScreenShareDisabled", - "columnName": "isScreenShareDisabled", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "defaultOrder", - "columnName": "defaultOrder", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "order", - "columnName": "order", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "2147483647" - }, - { - "fieldPath": "metatoolCode", - "columnName": "metatoolCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "defaultVariantCode", - "columnName": "defaultVariantCode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isAdded", - "columnName": "isAdded", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "false" - }, - { - "fieldPath": "isHidden", - "columnName": "isHidden", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isSpotlight", - "columnName": "isSpotlight", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "code" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "training_tips", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isCompleted` INTEGER NOT NULL, `isNew` INTEGER NOT NULL, `tool` TEXT NOT NULL, `locale` TEXT NOT NULL, `tipId` TEXT NOT NULL, PRIMARY KEY(`tool`, `locale`, `tipId`))", - "fields": [ - { - "fieldPath": "isCompleted", - "columnName": "isCompleted", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "isNew", - "columnName": "isNew", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "key.tool", - "columnName": "tool", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.locale", - "columnName": "locale", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "key.tipId", - "columnName": "tipId", - "affinity": "TEXT", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "tool", - "locale", - "tipId" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "users", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `ssoGuid` TEXT, `name` TEXT, `createdAt` INTEGER, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "ssoGuid", - "columnName": "ssoGuid", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "createdAt", - "columnName": "createdAt", - "affinity": "INTEGER", - "notNull": false - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_counters", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `count` INTEGER NOT NULL, `decayedCount` REAL NOT NULL, `delta` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`name`))", - "fields": [ - { - "fieldPath": "name", - "columnName": "name", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "decayedCount", - "columnName": "decayedCount", - "affinity": "REAL", - "notNull": true - }, - { - "fieldPath": "delta", - "columnName": "delta", - "affinity": "INTEGER", - "notNull": true, - "defaultValue": "0" - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "name" - ] - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "last_sync_times", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `time` INTEGER NOT NULL, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "time", - "columnName": "time", - "affinity": "INTEGER", - "notNull": true - } - ], - "primaryKey": { - "autoGenerate": false, - "columnNames": [ - "id" - ] - }, - "indices": [], - "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, '128676e0b58be0450281eda29dee40ff')" - ] - } -} \ No newline at end of file diff --git a/library/db/src/main/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabase.kt b/library/db/src/main/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabase.kt index 5413d5637e..b9ed395419 100644 --- a/library/db/src/main/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabase.kt +++ b/library/db/src/main/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabase.kt @@ -63,22 +63,7 @@ import org.cru.godtools.db.room.repository.UserRoomRepository LastSyncTimeEntity::class, ], autoMigrations = [ - AutoMigration(from = 6, to = 7), - AutoMigration(from = 7, to = 8), - AutoMigration(from = 8, to = 9), - AutoMigration(from = 9, to = 10), - AutoMigration(from = 10, to = 11), - AutoMigration(from = 11, to = 12), - AutoMigration(from = 12, to = 13), - AutoMigration(from = 13, to = 14, spec = Migration14::class), - AutoMigration(from = 14, to = 15), - AutoMigration(from = 15, to = 16, spec = ResetUserSyncMigration::class), - AutoMigration(from = 16, to = 17), - AutoMigration(from = 17, to = 18, spec = Migration18::class), - AutoMigration(from = 18, to = 19, spec = Migration19::class), - AutoMigration(from = 19, to = 20), - AutoMigration(from = 20, to = 21), - AutoMigration(from = 21, to = 22), + AutoMigration(from = 7, to = 22, spec = Migration7To22::class), AutoMigration(from = 22, to = 23), AutoMigration(from = 23, to = 24), AutoMigration(from = 24, to = 25), @@ -124,25 +109,9 @@ internal abstract class GodToolsRoomDatabase : RoomDatabase() { /* * Version history * - * v6.0.1 - * 6: 2022-12-05 * v6.1.0-v6.1.1 * 7: 2023-03-27 * v6.2.0 - * 8: 2023-01-24 - * 9: 2023-05-09 - * 10: 2023-05-08 - * 11: 2023-05-15 - * 12: 2023-06-08 - * 13: 2023-09-18 - * 14: 2023-09-18 - * 15: 2023-09-18 - * 16: 2023-09-19 - * 17: 2023-09-25 - * 18: 2023-11-21 - * 19: 2023-12-07 - * 20: 2024-01-17 - * 21: 2024-01-26 * 22: 2024-04-30 * v6.3.0 * 23: 2024-06-13 @@ -157,18 +126,10 @@ internal abstract class GodToolsRoomDatabase : RoomDatabase() { internal fun RoomDatabase.Builder.enableMigrations() = fallbackToDestructiveMigration(dropAllTables = true) -internal class ResetUserSyncMigration : AutoMigrationSpec { +@RenameColumn(tableName = "languages", fromColumnName = "id", toColumnName = "apiId") +internal class Migration7To22 : AutoMigrationSpec { override fun onPostMigrate(db: SupportSQLiteDatabase) { db.execSQL("DELETE FROM last_sync_times WHERE id LIKE ?", arrayOf("last_synced.user%")) } } - -@RenameColumn(tableName = "tools", fromColumnName = "isAdded", toColumnName = "isFavorite") -internal class Migration14 : AutoMigrationSpec - -@RenameColumn(tableName = "languages", fromColumnName = "id", toColumnName = "apiId") -internal class Migration18 : AutoMigrationSpec - -@RenameColumn(tableName = "tools", fromColumnName = "id", toColumnName = "apiId") -internal class Migration19 : AutoMigrationSpec // endregion Migrations diff --git a/library/db/src/main/kotlin/org/keynote/godtools/android/db/Contract.kt b/library/db/src/main/kotlin/org/keynote/godtools/android/db/Contract.kt index 3282636e24..b571c6661a 100644 --- a/library/db/src/main/kotlin/org/keynote/godtools/android/db/Contract.kt +++ b/library/db/src/main/kotlin/org/keynote/godtools/android/db/Contract.kt @@ -32,10 +32,6 @@ internal object Contract : BaseContract() { internal object LanguageTable : BaseTable() { internal const val TABLE_NAME = "languages" - const val COLUMN_ID = BaseTable.COLUMN_ID - const val COLUMN_CODE = "code" - const val COLUMN_NAME = "name" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) } @@ -85,22 +81,7 @@ internal object Contract : BaseContract() { COLUMN_SPOTLIGHT ) - private const val SQL_COLUMN_DETAILS_BANNER_ANIMATION = "$COLUMN_DETAILS_BANNER_ANIMATION INTEGER" - private const val SQL_COLUMN_META_TOOL = "$COLUMN_META_TOOL TEXT" - private const val SQL_COLUMN_DEFAULT_VARIANT = "$COLUMN_DEFAULT_VARIANT TEXT" - private const val SQL_COLUMN_SPOTLIGHT = "$COLUMN_SPOTLIGHT INTEGER" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) - - // region DB migrations - internal const val SQL_V48_CREATE_SPOTLIGHT = "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_SPOTLIGHT" - internal const val SQL_V48_POPULATE_SPOTLIGHT = "UPDATE $TABLE_NAME SET $COLUMN_SPOTLIGHT = 0" - internal const val SQL_V49_ALTER_DETAILS_BANNER_ANIMATION = - "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_DETAILS_BANNER_ANIMATION" - internal const val SQL_V50_ALTER_META_TOOL = "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_META_TOOL" - internal const val SQL_V51_ALTER_DEFAULT_VARIANT = - "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_DEFAULT_VARIANT" - // endregion DB migrations } internal object TranslationTable : BaseTable() { @@ -135,20 +116,7 @@ internal object Contract : BaseContract() { COLUMN_DOWNLOADED, ) - private const val SQL_COLUMN_DETAILS_OUTLINE = "$COLUMN_DETAILS_OUTLINE TEXT" - private const val SQL_COLUMN_DETAILS_BIBLE_REFERENCES = "$COLUMN_DETAILS_BIBLE_REFERENCES TEXT" - private const val SQL_COLUMN_DETAILS_CONVERSATION_STARTERS = "$COLUMN_DETAILS_CONVERSATION_STARTERS TEXT" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) - - // region DB migrations - internal const val SQL_V57_ALTER_DETAILS_OUTLINE = - "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_DETAILS_OUTLINE" - internal const val SQL_V57_ALTER_DETAILS_BIBLE_REFERENCES = - "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_DETAILS_BIBLE_REFERENCES" - internal const val SQL_V57_ALTER_DETAILS_CONVERSATION_STARTERS = - "ALTER TABLE $TABLE_NAME ADD COLUMN $SQL_COLUMN_DETAILS_CONVERSATION_STARTERS" - // endregion DB migrations } internal object AttachmentTable : BaseTable() { @@ -185,45 +153,24 @@ internal object Contract : BaseContract() { internal object FollowupTable : BaseTable() { const val TABLE_NAME = "followups" - const val COLUMN_NAME = "name" - const val COLUMN_EMAIL = "email" - const val COLUMN_DESTINATION = "destination" - const val COLUMN_LANGUAGE = "language" - const val COLUMN_CREATE_TIME = "created_at" - val SQL_DELETE_TABLE = drop(TABLE_NAME) } internal object GlobalActivityAnalyticsTable : BaseTable() { internal const val TABLE_NAME = "global_activity_analytics" - internal const val COLUMN_USERS = "users" - internal const val COLUMN_COUNTRIES = "countries" - internal const val COLUMN_LAUNCHES = "launches" - internal const val COLUMN_GOSPEL_PRESENTATIONS = "gospel_presentations" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) } internal object TrainingTipTable : Base { internal const val TABLE_NAME = "training_tips" - internal const val COLUMN_TOOL = ToolCode.COLUMN_TOOL - internal const val COLUMN_LANGUAGE = LanguageCode.COLUMN_LANGUAGE - internal const val COLUMN_TIP_ID = "tipId" - const val COLUMN_IS_COMPLETED = "isCompleted" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) } internal object UserCounterTable : Base { internal const val TABLE_NAME = "user_counters" - internal const val COLUMN_COUNTER_ID = "counter_id" - const val COLUMN_COUNT = "count" - const val COLUMN_DECAYED_COUNT = "decayed_count" - internal const val COLUMN_DELTA = "delta" - internal val SQL_DELETE_TABLE = drop(TABLE_NAME) } } diff --git a/library/db/src/main/kotlin/org/keynote/godtools/android/db/GodToolsDatabase.kt b/library/db/src/main/kotlin/org/keynote/godtools/android/db/GodToolsDatabase.kt index b80b2b785a..5782b1a6ae 100644 --- a/library/db/src/main/kotlin/org/keynote/godtools/android/db/GodToolsDatabase.kt +++ b/library/db/src/main/kotlin/org/keynote/godtools/android/db/GodToolsDatabase.kt @@ -5,28 +5,18 @@ import android.database.SQLException import android.database.sqlite.SQLiteConstraintException import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteException -import java.time.Instant import org.ccci.gto.android.common.db.CommonTables.LastSyncTable import org.ccci.gto.android.common.db.WalSQLiteOpenHelper -import org.ccci.gto.android.common.db.util.CursorUtils.getBool import org.ccci.gto.android.common.util.content.isApplicationDebuggable import org.ccci.gto.android.common.util.database.forEach -import org.ccci.gto.android.common.util.database.getDouble -import org.ccci.gto.android.common.util.database.getInt -import org.ccci.gto.android.common.util.database.getLocale -import org.ccci.gto.android.common.util.database.getLong import org.ccci.gto.android.common.util.database.getString import org.ccci.gto.android.common.util.database.map import org.cru.godtools.db.room.GodToolsRoomDatabase import org.cru.godtools.db.room.entity.AttachmentEntity import org.cru.godtools.db.room.entity.DownloadedFileEntity import org.cru.godtools.db.room.entity.DownloadedTranslationFileEntity.Companion.toEntity -import org.cru.godtools.db.room.entity.FollowupEntity -import org.cru.godtools.db.room.entity.LanguageEntity import org.cru.godtools.db.room.entity.ToolEntity -import org.cru.godtools.db.room.entity.TrainingTipEntity import org.cru.godtools.db.room.entity.TranslationEntity -import org.cru.godtools.db.room.entity.partial.MigrationGlobalActivity import org.keynote.godtools.android.db.Contract.AttachmentTable import org.keynote.godtools.android.db.Contract.DownloadedFileTable import org.keynote.godtools.android.db.Contract.FollowupTable @@ -46,18 +36,6 @@ private const val DATABASE_VERSION = 63 /* * Version history * - * v5.7.0 - * 48: 2022-02-14 - * 49: 2022-04-08 - * 50: 2022-04-29 - * 51: 2022-05-02 - * v6.0.0 - v6.0.1 - * 52: 2022-09-22 - * 53: 2022-09-23 - * 54: 2022-11-04 - * 55: 2022-11-22 - * 56: 2022-12-06 - * 57: 2022-12-06 * v6.1.0 - v6.2.0 * 58: 2023-01-25 * 59: 2023-05-15 @@ -65,6 +43,7 @@ private const val DATABASE_VERSION = 63 * 61: 2023-06-07 * 62: 2024-01-17 * 63: 2024-01-17 + * v6.3.0 */ internal class GodToolsDatabase(private val context: Context, private val roomDb: GodToolsRoomDatabase) : @@ -77,176 +56,6 @@ internal class GodToolsDatabase(private val context: Context, private val roomDb var upgradeTo = oldVersion + 1 while (upgradeTo <= newVersion) { when (upgradeTo) { - 48 -> { - db.execSQL(ToolTable.SQL_V48_CREATE_SPOTLIGHT) - db.execSQL(ToolTable.SQL_V48_POPULATE_SPOTLIGHT) - } - - 49 -> db.execSQL(ToolTable.SQL_V49_ALTER_DETAILS_BANNER_ANIMATION) - - 50 -> db.execSQL(ToolTable.SQL_V50_ALTER_META_TOOL) - - 51 -> db.execSQL(ToolTable.SQL_V51_ALTER_DEFAULT_VARIANT) - - 52 -> { - db.query( - UserCounterTable.TABLE_NAME, - arrayOf( - UserCounterTable.COLUMN_COUNTER_ID, - UserCounterTable.COLUMN_COUNT, - UserCounterTable.COLUMN_DECAYED_COUNT, - UserCounterTable.COLUMN_DELTA - ), - null, - emptyArray(), - null, - null, - null - ).use { - while (it.moveToNext()) { - roomDb.userCountersRepository.migrateCounter( - it.getString(UserCounterTable.COLUMN_COUNTER_ID) ?: continue, - it.getInt(UserCounterTable.COLUMN_COUNT, 0), - it.getDouble(UserCounterTable.COLUMN_DECAYED_COUNT, 0.0), - it.getInt(UserCounterTable.COLUMN_DELTA, 0), - ) - } - } - - db.execSQL(UserCounterTable.SQL_DELETE_TABLE) - } - - 53 -> { - db.query( - GlobalActivityAnalyticsTable.TABLE_NAME, - arrayOf( - GlobalActivityAnalyticsTable.COLUMN_USERS, - GlobalActivityAnalyticsTable.COLUMN_COUNTRIES, - GlobalActivityAnalyticsTable.COLUMN_LAUNCHES, - GlobalActivityAnalyticsTable.COLUMN_GOSPEL_PRESENTATIONS - ), - null, - emptyArray(), - null, - null, - null - ).use { - if (it.moveToFirst()) { - roomDb.globalActivityDao.insertOrIgnore( - MigrationGlobalActivity( - it.getInt(GlobalActivityAnalyticsTable.COLUMN_USERS, 0), - it.getInt(GlobalActivityAnalyticsTable.COLUMN_COUNTRIES, 0), - it.getInt(GlobalActivityAnalyticsTable.COLUMN_LAUNCHES, 0), - it.getInt(GlobalActivityAnalyticsTable.COLUMN_GOSPEL_PRESENTATIONS, 0), - ) - ) - } - } - - db.execSQL(GlobalActivityAnalyticsTable.SQL_DELETE_TABLE) - } - - 54 -> { - db.query( - TrainingTipTable.TABLE_NAME, - arrayOf( - TrainingTipTable.COLUMN_TOOL, - TrainingTipTable.COLUMN_LANGUAGE, - TrainingTipTable.COLUMN_TIP_ID, - TrainingTipTable.COLUMN_IS_COMPLETED - ), - null, - emptyArray(), - null, - null, - null - ).use { - while (it.moveToNext()) { - roomDb.trainingTipDao.insertOrIgnoreBlocking( - TrainingTipEntity( - TrainingTipEntity.Key( - tool = it.getString(TrainingTipTable.COLUMN_TOOL) ?: continue, - locale = it.getLocale(TrainingTipTable.COLUMN_LANGUAGE) ?: continue, - tipId = it.getString(TrainingTipTable.COLUMN_TIP_ID) ?: continue, - ) - ).apply { - isCompleted = getBool(it, TrainingTipTable.COLUMN_IS_COMPLETED, false) - isNew = true - } - ) - } - } - - db.execSQL(TrainingTipTable.SQL_DELETE_TABLE) - } - - 55 -> { - db.query( - FollowupTable.TABLE_NAME, - arrayOf( - FollowupTable.COLUMN_NAME, - FollowupTable.COLUMN_EMAIL, - FollowupTable.COLUMN_LANGUAGE, - FollowupTable.COLUMN_DESTINATION, - FollowupTable.COLUMN_CREATE_TIME - ), - null, - emptyArray(), - null, - null, - null - ).use { - while (it.moveToNext()) { - roomDb.followupsDao.insertBlocking( - FollowupEntity( - name = it.getString(FollowupTable.COLUMN_NAME), - email = it.getString(FollowupTable.COLUMN_EMAIL) ?: continue, - language = it.getLocale(FollowupTable.COLUMN_LANGUAGE) ?: continue, - destination = it.getLong(FollowupTable.COLUMN_DESTINATION) ?: continue, - createdAt = it.getLong(FollowupTable.COLUMN_CREATE_TIME) - ?.let { Instant.ofEpochMilli(it) } ?: Instant.now() - ) - ) - } - } - - db.execSQL(FollowupTable.SQL_DELETE_TABLE) - } - - 56 -> { - db.query( - LanguageTable.TABLE_NAME, - arrayOf( - LanguageTable.COLUMN_ID, - LanguageTable.COLUMN_CODE, - LanguageTable.COLUMN_NAME - ), - null, - emptyArray(), - null, - null, - null - ).use { - roomDb.languagesDao.insertOrIgnoreLanguages( - it.map { - LanguageEntity( - code = it.getLocale(LanguageTable.COLUMN_CODE) ?: return@map null, - name = it.getString(LanguageTable.COLUMN_NAME), - apiId = it.getLong(LanguageTable.COLUMN_ID), - ) - }.filterNotNull() - ) - } - - db.execSQL(LanguageTable.SQL_DELETE_TABLE) - } - - 57 -> { - db.execSQL(TranslationTable.SQL_V57_ALTER_DETAILS_OUTLINE) - db.execSQL(TranslationTable.SQL_V57_ALTER_DETAILS_BIBLE_REFERENCES) - db.execSQL(TranslationTable.SQL_V57_ALTER_DETAILS_CONVERSATION_STARTERS) - } - 58 -> { db.query( DownloadedFileTable.TABLE_NAME, diff --git a/library/db/src/test/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabaseMigrationIT.kt b/library/db/src/test/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabaseMigrationIT.kt index 0030a36fb3..dcb662d832 100644 --- a/library/db/src/test/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabaseMigrationIT.kt +++ b/library/db/src/test/kotlin/org/cru/godtools/db/room/GodToolsRoomDatabaseMigrationIT.kt @@ -8,20 +8,19 @@ import androidx.room.testing.MigrationTestHelper import androidx.sqlite.db.SupportSQLiteDatabase import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry -import java.util.UUID import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith -import kotlin.test.assertFalse -import kotlin.test.assertNotEquals import kotlin.test.assertNull import kotlin.test.assertTrue -import org.ccci.gto.android.common.util.database.getString +import kotlin.uuid.ExperimentalUuidApi +import kotlin.uuid.Uuid import org.ccci.gto.android.common.util.database.map import org.cru.godtools.model.Tool import org.junit.Rule import org.junit.runner.RunWith +@OptIn(ExperimentalUuidApi::class) @RunWith(AndroidJUnit4::class) class GodToolsRoomDatabaseMigrationIT { companion object { @@ -32,201 +31,37 @@ class GodToolsRoomDatabaseMigrationIT { val helper = MigrationTestHelper(InstrumentationRegistry.getInstrumentation(), GodToolsRoomDatabase::class.java) @Test - fun testMigrate6To7() { - val guid = UUID.randomUUID().toString() - val usersQuery = "SELECT * FROM users" - - // create v6 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 6).use { db -> - db.execSQL("INSERT INTO users (id, ssoGuid) VALUES (?, ?)", arrayOf("user1", guid)) - db.query(usersQuery).use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("user1", it.getString("id")) - assertEquals(guid, it.getString("ssoGuid")) - } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 7, true, *MIGRATIONS).use { db -> - db.query(usersQuery).use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("user1", it.getString("id")) - assertEquals(guid, it.getString("ssoGuid")) - assertNotEquals(-1, it.getColumnIndex("name")) - } - } - } - - @Test - fun testMigrate7To8() { + fun testMigrate7To22() { + val name = Uuid.random().toString() val filesQuery = "SELECT * FROM downloadedFiles" + val toolsQuery = "SELECT * FROM tools" + val attachmentsQuery = "SELECT * FROM attachments" + val translationsQuery = "SELECT * FROM translations" + val translationFilesQuery = "SELECT * FROM downloadedTranslationFiles" // create v7 database helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 7).use { db -> + db.execSQL("INSERT INTO languages (id, code) VALUES (1, ?)", arrayOf("en")) + db.execSQL("INSERT INTO users (id, name) VALUES (1, ?)", arrayOf(name)) + db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("last_synced.user:1", "1234")) db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) assertFailsWith { db.query(filesQuery) } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 8, true, *MIGRATIONS).use { db -> - db.query("SELECT id, time FROM last_sync_times").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("sync_time", it.getStringOrNull(0)) - assertEquals(1234, it.getIntOrNull(1)) - } - db.query(filesQuery).close() - } - } - - @Test - fun testMigrate8To9() { - val toolsQuery = "SELECT * FROM tools" - - // create v8 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 8).use { db -> - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) assertFailsWith { db.query(toolsQuery) } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 9, true, *MIGRATIONS).use { db -> - db.query("SELECT id, time FROM last_sync_times").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("sync_time", it.getStringOrNull(0)) - assertEquals(1234, it.getIntOrNull(1)) - } - db.query(toolsQuery).close() - } - } - - @Test - fun testMigrate9To10() { - val attachmentsQuery = "SELECT * FROM attachments" - - // create v9 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 9).use { db -> - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) assertFailsWith { db.query(attachmentsQuery) } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 10, true, *MIGRATIONS).use { db -> - db.query("SELECT id, time FROM last_sync_times").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("sync_time", it.getStringOrNull(0)) - assertEquals(1234, it.getIntOrNull(1)) - } - db.query(attachmentsQuery).close() - } - } - - @Test - fun testMigrate10To11() { - val translationsQuery = "SELECT * FROM translations" - - // create v10 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 10).use { db -> - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) assertFailsWith { db.query(translationsQuery) } + assertFailsWith { db.query(translationFilesQuery) } } // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 11, true, *MIGRATIONS).use { db -> - db.query("SELECT id, time FROM last_sync_times").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("sync_time", it.getStringOrNull(0)) - assertEquals(1234, it.getIntOrNull(1)) - } - db.query(translationsQuery).close() - } - } - - @Test - fun testMigrate11To12() { - // create v11 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 11).use { db -> - db.execSQL("INSERT INTO languages (id, code) VALUES (1, ?)", arrayOf("en")) - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 12, true, *MIGRATIONS).use { db -> - db.query("SELECT id, code, isAdded FROM languages").use { + helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 22, true, *MIGRATIONS).use { db -> + db.query("SELECT apiId, code, isAdded FROM languages").use { assertEquals(1, it.count) it.moveToFirst() assertEquals(1, it.getIntOrNull(0)) assertEquals("en", it.getStringOrNull(1)) assertEquals(0, it.getIntOrNull(2)) } - } - } - - @Test - fun testMigrate12To13() { - // create v12 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 12).use {} - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 13, true, *MIGRATIONS).use {} - } - - @Test - fun testMigrate13To14() { - // create v13 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 13).use { db -> - db.execSQL("""INSERT INTO tools (id, code, type, isAdded) VALUES (1, "a", "TRACT", 1)""") - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 14, true, *MIGRATIONS).use { db -> - db.query("SELECT id, code, isFavorite FROM tools").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals(1, it.getIntOrNull(0)) - assertEquals("a", it.getStringOrNull(1)) - assertEquals(1, it.getIntOrNull(2)) - } - } - } - - @Test - fun testMigrate14To15() { - // create v14 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 14).use { db -> - db.execSQL("""INSERT INTO tools (id, code, type) VALUES (1, "a", "TRACT")""") - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 15, true, *MIGRATIONS).use { db -> - db.query("SELECT id, code, changedFields FROM tools").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals(1, it.getIntOrNull(0)) - assertEquals("a", it.getStringOrNull(1)) - assertEquals("", it.getStringOrNull(2)) - } - } - } - - @Test - fun testMigrate15To16() { - val name = UUID.randomUUID().toString() - - // create v15 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 15).use { db -> - db.execSQL("INSERT INTO users (id, name) VALUES (1, ?)", arrayOf(name)) - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("last_synced.user:1", "1234")) - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 16, true, *MIGRATIONS).use { db -> - db.query("SELECT id, name, givenName, familyName, email FROM users").use { + db.query("SELECT id, name, givenName, familyName, email, isInitialFavoriteToolsSynced FROM users").use { assertEquals(1, it.count) it.moveToFirst() assertEquals(1, it.getIntOrNull(0)) @@ -234,125 +69,29 @@ class GodToolsRoomDatabaseMigrationIT { assertNull(it.getStringOrNull(2)) assertNull(it.getStringOrNull(3)) assertNull(it.getStringOrNull(4)) + assertEquals(0, it.getIntOrNull(5)) } - db.query("SELECT id, time FROM last_sync_times").use { assertEquals(1, it.count) it.moveToFirst() assertEquals("sync_time", it.getStringOrNull(0)) assertEquals(1234, it.getIntOrNull(1)) } - } - } - - @Test - fun testMigrate16To17() { - // create v16 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 16).use { db -> - db.execSQL("""INSERT INTO users (id) VALUES (1)""") - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 17, true, *MIGRATIONS).use { db -> - db.query("SELECT id, isInitialFavoriteToolsSynced FROM users").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals(1, it.getIntOrNull(0)) - assertEquals(0, it.getIntOrNull(1)) - } - } - } - - @Test - fun testMigrate17To18() { - // create v17 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 17).use { db -> - db.execSQL("""INSERT INTO languages (id, code) VALUES (1, "en")""") - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 18, true, *MIGRATIONS).use { db -> - db.query("SELECT apiId, code FROM languages").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals(1, it.getIntOrNull(0)) - assertEquals("en", it.getStringOrNull(1)) - } - } - } - - @Test - fun testMigrate18To19() { - // create v18 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 18).use { db -> - db.execSQL("""INSERT INTO tools (id, code, type) VALUES (1, "a", "TRACT")""") - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 19, true, *MIGRATIONS).use { db -> - db.query("SELECT apiId, code, type FROM tools").use { + db.execSQL("""INSERT INTO tools (apiId, code, type) VALUES (1, "a", "TRACT")""") + db.query("SELECT apiId, code, isFavorite, changedFields, defaultLocale FROM tools").use { assertEquals(1, it.count) it.moveToFirst() assertEquals(1, it.getIntOrNull(0)) assertEquals("a", it.getStringOrNull(1)) - assertEquals("TRACT", it.getStringOrNull(2)) - } - } - } - - @Test - fun testMigrate19To20() { - val filesQuery = "SELECT * FROM downloadedTranslationFiles" - - // create v19 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 19).use { db -> - db.execSQL("INSERT INTO last_sync_times (id, time) VALUES (?, ?)", arrayOf("sync_time", "1234")) - assertFailsWith { db.query(filesQuery) } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 20, true, *MIGRATIONS).use { db -> - db.query("SELECT id, time FROM last_sync_times").use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("sync_time", it.getStringOrNull(0)) - assertEquals(1234, it.getIntOrNull(1)) - } - db.query(filesQuery).close() - } - } - - @Test - fun testMigrate20To21() { - val defaultLocaleQuery = "SELECT code, defaultLocale FROM tools WHERE code = 'kgp'" - - // create v20 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 20).use { db -> - db.execSQL("INSERT INTO tools (code, type) VALUES (?, ?)", arrayOf("kgp", Tool.Type.TRACT)) - assertFailsWith { db.query(defaultLocaleQuery) } - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 21, true, *MIGRATIONS).use { db -> - db.query(defaultLocaleQuery).use { - assertEquals(1, it.count) - it.moveToFirst() - assertEquals("kgp", it.getStringOrNull(0)) - assertEquals("en", it.getStringOrNull(1)) + assertEquals(0, it.getIntOrNull(2)) + assertEquals("", it.getStringOrNull(3)) + assertEquals("en", it.getStringOrNull(4)) } - } - } - - @Test - fun testMigrate21To22() { - // create v21 database - helper.createDatabase(GodToolsRoomDatabase.DATABASE_NAME, 21).use { db -> - assertFalse(db.dumpIndices("translations").values.any { it == setOf("locale") }) - } - - // run migration - helper.runMigrationsAndValidate(GodToolsRoomDatabase.DATABASE_NAME, 22, true, *MIGRATIONS).use { db -> assertTrue(db.dumpIndices("translations").values.any { it == setOf("locale") }) + db.query(filesQuery).close() + db.query(attachmentsQuery).close() + db.query(translationsQuery).close() + db.query(translationFilesQuery).close() } }