{ "formatVersion": 1, "database": { "version": 1, "identityHash": "bf86c814bcbc98d81f1530ea479c6340", "entities": [ { "tableName": "CoreRepository", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `address` TEXT NOT NULL, `timestamp` INTEGER NOT NULL, `version` INTEGER, `description` TEXT NOT NULL, `certificate` TEXT, `icon_name` TEXT, `icon_sha256` TEXT, `icon_size` INTEGER)", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "address", "columnName": "address", "affinity": "TEXT", "notNull": true }, { "fieldPath": "timestamp", "columnName": "timestamp", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "version", "columnName": "version", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": true }, { "fieldPath": "certificate", "columnName": "certificate", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.name", "columnName": "icon_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.sha256", "columnName": "icon_sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.size", "columnName": "icon_size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId" ], "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { "tableName": "Mirror", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `url` TEXT NOT NULL, `location` TEXT, PRIMARY KEY(`repoId`, `url`), FOREIGN KEY(`repoId`) REFERENCES `CoreRepository`(`repoId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "url", "columnName": "url", "affinity": "TEXT", "notNull": true }, { "fieldPath": "location", "columnName": "location", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "url" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "CoreRepository", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId" ], "referencedColumns": [ "repoId" ] } ] }, { "tableName": "AntiFeature", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `icon_name` TEXT, `icon_sha256` TEXT, `icon_size` INTEGER, PRIMARY KEY(`repoId`, `id`), FOREIGN KEY(`repoId`) REFERENCES `CoreRepository`(`repoId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": true }, { "fieldPath": "icon.name", "columnName": "icon_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.sha256", "columnName": "icon_sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.size", "columnName": "icon_size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "id" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "CoreRepository", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId" ], "referencedColumns": [ "repoId" ] } ] }, { "tableName": "Category", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `icon_name` TEXT, `icon_sha256` TEXT, `icon_size` INTEGER, PRIMARY KEY(`repoId`, `id`), FOREIGN KEY(`repoId`) REFERENCES `CoreRepository`(`repoId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": true }, { "fieldPath": "icon.name", "columnName": "icon_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.sha256", "columnName": "icon_sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.size", "columnName": "icon_size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "id" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "CoreRepository", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId" ], "referencedColumns": [ "repoId" ] } ] }, { "tableName": "ReleaseChannel", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `icon_name` TEXT, `icon_sha256` TEXT, `icon_size` INTEGER, PRIMARY KEY(`repoId`, `id`), FOREIGN KEY(`repoId`) REFERENCES `CoreRepository`(`repoId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "id", "columnName": "id", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": true }, { "fieldPath": "icon.name", "columnName": "icon_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.sha256", "columnName": "icon_sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "icon.size", "columnName": "icon_size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "id" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "CoreRepository", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId" ], "referencedColumns": [ "repoId" ] } ] }, { "tableName": "RepositoryPreferences", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `weight` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `lastUpdated` INTEGER, `lastETag` TEXT, `userMirrors` TEXT, `disabledMirrors` TEXT, `username` TEXT, `password` TEXT, `isSwap` INTEGER NOT NULL, PRIMARY KEY(`repoId`))", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "weight", "columnName": "weight", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "enabled", "columnName": "enabled", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "lastUpdated", "columnName": "lastUpdated", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "lastETag", "columnName": "lastETag", "affinity": "TEXT", "notNull": false }, { "fieldPath": "userMirrors", "columnName": "userMirrors", "affinity": "TEXT", "notNull": false }, { "fieldPath": "disabledMirrors", "columnName": "disabledMirrors", "affinity": "TEXT", "notNull": false }, { "fieldPath": "username", "columnName": "username", "affinity": "TEXT", "notNull": false }, { "fieldPath": "password", "columnName": "password", "affinity": "TEXT", "notNull": false }, { "fieldPath": "isSwap", "columnName": "isSwap", "affinity": "INTEGER", "notNull": true } ], "primaryKey": { "columnNames": [ "repoId" ], "autoGenerate": false }, "indices": [], "foreignKeys": [] }, { "tableName": "AppMetadata", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `packageId` TEXT NOT NULL, `added` INTEGER NOT NULL, `lastUpdated` INTEGER NOT NULL, `name` TEXT, `summary` TEXT, `description` TEXT, `localizedName` TEXT, `localizedSummary` TEXT, `webSite` TEXT, `changelog` TEXT, `license` TEXT, `sourceCode` TEXT, `issueTracker` TEXT, `translation` TEXT, `preferredSigner` TEXT, `video` TEXT, `categories` TEXT, `isCompatible` INTEGER NOT NULL, `author_name` TEXT, `author_email` TEXT, `author_website` TEXT, `author_phone` TEXT, `donation_url` TEXT, `donation_liberapayID` TEXT, `donation_liberapay` TEXT, `donation_openCollective` TEXT, `donation_bitcoin` TEXT, `donation_litecoin` TEXT, `donation_flattrID` TEXT, PRIMARY KEY(`repoId`, `packageId`), FOREIGN KEY(`repoId`) REFERENCES `CoreRepository`(`repoId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "packageId", "columnName": "packageId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "added", "columnName": "added", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "lastUpdated", "columnName": "lastUpdated", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "summary", "columnName": "summary", "affinity": "TEXT", "notNull": false }, { "fieldPath": "description", "columnName": "description", "affinity": "TEXT", "notNull": false }, { "fieldPath": "localizedName", "columnName": "localizedName", "affinity": "TEXT", "notNull": false }, { "fieldPath": "localizedSummary", "columnName": "localizedSummary", "affinity": "TEXT", "notNull": false }, { "fieldPath": "webSite", "columnName": "webSite", "affinity": "TEXT", "notNull": false }, { "fieldPath": "changelog", "columnName": "changelog", "affinity": "TEXT", "notNull": false }, { "fieldPath": "license", "columnName": "license", "affinity": "TEXT", "notNull": false }, { "fieldPath": "sourceCode", "columnName": "sourceCode", "affinity": "TEXT", "notNull": false }, { "fieldPath": "issueTracker", "columnName": "issueTracker", "affinity": "TEXT", "notNull": false }, { "fieldPath": "translation", "columnName": "translation", "affinity": "TEXT", "notNull": false }, { "fieldPath": "preferredSigner", "columnName": "preferredSigner", "affinity": "TEXT", "notNull": false }, { "fieldPath": "video", "columnName": "video", "affinity": "TEXT", "notNull": false }, { "fieldPath": "categories", "columnName": "categories", "affinity": "TEXT", "notNull": false }, { "fieldPath": "isCompatible", "columnName": "isCompatible", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "author.name", "columnName": "author_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "author.email", "columnName": "author_email", "affinity": "TEXT", "notNull": false }, { "fieldPath": "author.website", "columnName": "author_website", "affinity": "TEXT", "notNull": false }, { "fieldPath": "author.phone", "columnName": "author_phone", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.url", "columnName": "donation_url", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.liberapayID", "columnName": "donation_liberapayID", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.liberapay", "columnName": "donation_liberapay", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.openCollective", "columnName": "donation_openCollective", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.bitcoin", "columnName": "donation_bitcoin", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.litecoin", "columnName": "donation_litecoin", "affinity": "TEXT", "notNull": false }, { "fieldPath": "donation.flattrID", "columnName": "donation_flattrID", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "packageId" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "CoreRepository", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId" ], "referencedColumns": [ "repoId" ] } ] }, { "tableName": "LocalizedFile", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `packageId` TEXT NOT NULL, `type` TEXT NOT NULL, `locale` TEXT NOT NULL, `name` TEXT NOT NULL, `sha256` TEXT, `size` INTEGER, PRIMARY KEY(`repoId`, `packageId`, `type`, `locale`), FOREIGN KEY(`repoId`, `packageId`) REFERENCES `AppMetadata`(`repoId`, `packageId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "packageId", "columnName": "packageId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": true }, { "fieldPath": "locale", "columnName": "locale", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "sha256", "columnName": "sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "packageId", "type", "locale" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "AppMetadata", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId", "packageId" ], "referencedColumns": [ "repoId", "packageId" ] } ] }, { "tableName": "LocalizedFileList", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `packageId` TEXT NOT NULL, `type` TEXT NOT NULL, `locale` TEXT NOT NULL, `name` TEXT NOT NULL, `sha256` TEXT, `size` INTEGER, PRIMARY KEY(`repoId`, `packageId`, `type`, `locale`, `name`), FOREIGN KEY(`repoId`, `packageId`) REFERENCES `AppMetadata`(`repoId`, `packageId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "packageId", "columnName": "packageId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": true }, { "fieldPath": "locale", "columnName": "locale", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "sha256", "columnName": "sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "size", "columnName": "size", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "packageId", "type", "locale", "name" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "AppMetadata", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId", "packageId" ], "referencedColumns": [ "repoId", "packageId" ] } ] }, { "tableName": "Version", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `packageId` TEXT NOT NULL, `versionId` TEXT NOT NULL, `added` INTEGER NOT NULL, `releaseChannels` TEXT, `antiFeatures` TEXT, `whatsNew` TEXT, `isCompatible` INTEGER NOT NULL, `file_name` TEXT NOT NULL, `file_sha256` TEXT NOT NULL, `file_size` INTEGER, `src_name` TEXT, `src_sha256` TEXT, `src_size` INTEGER, `manifest_versionName` TEXT NOT NULL, `manifest_versionCode` INTEGER NOT NULL, `manifest_maxSdkVersion` INTEGER, `manifest_nativecode` TEXT, `manifest_features` TEXT, `manifest_usesSdk_minSdkVersion` INTEGER, `manifest_usesSdk_targetSdkVersion` INTEGER, `manifest_signer_sha256` TEXT, PRIMARY KEY(`repoId`, `packageId`, `versionId`), FOREIGN KEY(`repoId`, `packageId`) REFERENCES `AppMetadata`(`repoId`, `packageId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "packageId", "columnName": "packageId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "versionId", "columnName": "versionId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "added", "columnName": "added", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "releaseChannels", "columnName": "releaseChannels", "affinity": "TEXT", "notNull": false }, { "fieldPath": "antiFeatures", "columnName": "antiFeatures", "affinity": "TEXT", "notNull": false }, { "fieldPath": "whatsNew", "columnName": "whatsNew", "affinity": "TEXT", "notNull": false }, { "fieldPath": "isCompatible", "columnName": "isCompatible", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "file.name", "columnName": "file_name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "file.sha256", "columnName": "file_sha256", "affinity": "TEXT", "notNull": true }, { "fieldPath": "file.size", "columnName": "file_size", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "src.name", "columnName": "src_name", "affinity": "TEXT", "notNull": false }, { "fieldPath": "src.sha256", "columnName": "src_sha256", "affinity": "TEXT", "notNull": false }, { "fieldPath": "src.size", "columnName": "src_size", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "manifest.versionName", "columnName": "manifest_versionName", "affinity": "TEXT", "notNull": true }, { "fieldPath": "manifest.versionCode", "columnName": "manifest_versionCode", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "manifest.maxSdkVersion", "columnName": "manifest_maxSdkVersion", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "manifest.nativecode", "columnName": "manifest_nativecode", "affinity": "TEXT", "notNull": false }, { "fieldPath": "manifest.features", "columnName": "manifest_features", "affinity": "TEXT", "notNull": false }, { "fieldPath": "manifest.usesSdk.minSdkVersion", "columnName": "manifest_usesSdk_minSdkVersion", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "manifest.usesSdk.targetSdkVersion", "columnName": "manifest_usesSdk_targetSdkVersion", "affinity": "INTEGER", "notNull": false }, { "fieldPath": "manifest.signer.sha256", "columnName": "manifest_signer_sha256", "affinity": "TEXT", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "packageId", "versionId" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "AppMetadata", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId", "packageId" ], "referencedColumns": [ "repoId", "packageId" ] } ] }, { "tableName": "VersionedString", "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`repoId` INTEGER NOT NULL, `packageId` TEXT NOT NULL, `versionId` TEXT NOT NULL, `type` TEXT NOT NULL, `name` TEXT NOT NULL, `version` INTEGER, PRIMARY KEY(`repoId`, `packageId`, `versionId`, `type`, `name`), FOREIGN KEY(`repoId`, `packageId`, `versionId`) REFERENCES `Version`(`repoId`, `packageId`, `versionId`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "repoId", "columnName": "repoId", "affinity": "INTEGER", "notNull": true }, { "fieldPath": "packageId", "columnName": "packageId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "versionId", "columnName": "versionId", "affinity": "TEXT", "notNull": true }, { "fieldPath": "type", "columnName": "type", "affinity": "TEXT", "notNull": true }, { "fieldPath": "name", "columnName": "name", "affinity": "TEXT", "notNull": true }, { "fieldPath": "version", "columnName": "version", "affinity": "INTEGER", "notNull": false } ], "primaryKey": { "columnNames": [ "repoId", "packageId", "versionId", "type", "name" ], "autoGenerate": false }, "indices": [], "foreignKeys": [ { "table": "Version", "onDelete": "CASCADE", "onUpdate": "NO ACTION", "columns": [ "repoId", "packageId", "versionId" ], "referencedColumns": [ "repoId", "packageId", "versionId" ] } ] } ], "views": [ { "viewName": "LocalizedIcon", "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT * FROM LocalizedFile\n JOIN RepositoryPreferences AS prefs USING (repoId)\n WHERE type='icon' GROUP BY repoId, packageId, locale HAVING MAX(prefs.weight)" } ], "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, 'bf86c814bcbc98d81f1530ea479c6340')" ] } }