446 lines
14 KiB
JSON
446 lines
14 KiB
JSON
{
|
|
"formatVersion": 1,
|
|
"database": {
|
|
"version": 3,
|
|
"identityHash": "9a75048d4b3b55da3ad9767f5dbb83ac",
|
|
"entities": [
|
|
{
|
|
"tableName": "search_history",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`sequence` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `content` TEXT NOT NULL)",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "sequence",
|
|
"columnName": "sequence",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "content",
|
|
"columnName": "content",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"autoGenerate": true,
|
|
"columnNames": [
|
|
"sequence"
|
|
]
|
|
},
|
|
"indices": [
|
|
{
|
|
"name": "distinct_content",
|
|
"unique": true,
|
|
"columnNames": [
|
|
"content"
|
|
],
|
|
"orders": [],
|
|
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `distinct_content` ON `${TABLE_NAME}` (`content`)"
|
|
},
|
|
{
|
|
"name": "sequence_desc",
|
|
"unique": false,
|
|
"columnNames": [
|
|
"sequence"
|
|
],
|
|
"orders": [
|
|
"DESC"
|
|
],
|
|
"createSql": "CREATE INDEX IF NOT EXISTS `sequence_desc` ON `${TABLE_NAME}` (`sequence` DESC)"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"tableName": "search_tag",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `content` TEXT NOT NULL, `useCount` INTEGER NOT NULL)",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "id",
|
|
"columnName": "id",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "content",
|
|
"columnName": "content",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "useCount",
|
|
"columnName": "useCount",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"autoGenerate": true,
|
|
"columnNames": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"tableName": "subject_collection",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_index` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `subjectId` INTEGER NOT NULL, `name` TEXT NOT NULL, `nameCn` TEXT NOT NULL, `summary` TEXT NOT NULL, `nsfw` INTEGER NOT NULL, `imageLarge` TEXT NOT NULL, `totalEpisodes` INTEGER NOT NULL, `airDate` INTEGER NOT NULL, `aliases` BLOB NOT NULL, `tags` BLOB NOT NULL, `completeDate` INTEGER NOT NULL, `collectionType` TEXT NOT NULL, `lastUpdated` INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP, `collection_stats_wish` INTEGER NOT NULL, `collection_stats_doing` INTEGER NOT NULL, `collection_stats_done` INTEGER NOT NULL, `collection_stats_onHold` INTEGER NOT NULL, `collection_stats_dropped` INTEGER NOT NULL, `rating_rank` INTEGER NOT NULL, `rating_total` INTEGER NOT NULL, `rating_score` TEXT NOT NULL, `rating_count_s1` INTEGER NOT NULL, `rating_count_s2` INTEGER NOT NULL, `rating_count_s3` INTEGER NOT NULL, `rating_count_s4` INTEGER NOT NULL, `rating_count_s5` INTEGER NOT NULL, `rating_count_s6` INTEGER NOT NULL, `rating_count_s7` INTEGER NOT NULL, `rating_count_s8` INTEGER NOT NULL, `rating_count_s9` INTEGER NOT NULL, `rating_count_s10` INTEGER NOT NULL, `self_rating_score` INTEGER NOT NULL, `self_rating_comment` TEXT, `self_rating_tags` BLOB NOT NULL, `self_rating_isPrivate` INTEGER NOT NULL)",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "_index",
|
|
"columnName": "_index",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "subjectId",
|
|
"columnName": "subjectId",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "name",
|
|
"columnName": "name",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "nameCn",
|
|
"columnName": "nameCn",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "summary",
|
|
"columnName": "summary",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "nsfw",
|
|
"columnName": "nsfw",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "imageLarge",
|
|
"columnName": "imageLarge",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "totalEpisodes",
|
|
"columnName": "totalEpisodes",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "airDate",
|
|
"columnName": "airDate",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "aliases",
|
|
"columnName": "aliases",
|
|
"affinity": "BLOB",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "tags",
|
|
"columnName": "tags",
|
|
"affinity": "BLOB",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "completeDate",
|
|
"columnName": "completeDate",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "collectionType",
|
|
"columnName": "collectionType",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "lastUpdated",
|
|
"columnName": "lastUpdated",
|
|
"affinity": "INTEGER",
|
|
"notNull": true,
|
|
"defaultValue": "CURRENT_TIMESTAMP"
|
|
},
|
|
{
|
|
"fieldPath": "collectionStats.wish",
|
|
"columnName": "collection_stats_wish",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "collectionStats.doing",
|
|
"columnName": "collection_stats_doing",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "collectionStats.done",
|
|
"columnName": "collection_stats_done",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "collectionStats.onHold",
|
|
"columnName": "collection_stats_onHold",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "collectionStats.dropped",
|
|
"columnName": "collection_stats_dropped",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.rank",
|
|
"columnName": "rating_rank",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.total",
|
|
"columnName": "rating_total",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.score",
|
|
"columnName": "rating_score",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s1",
|
|
"columnName": "rating_count_s1",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s2",
|
|
"columnName": "rating_count_s2",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s3",
|
|
"columnName": "rating_count_s3",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s4",
|
|
"columnName": "rating_count_s4",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s5",
|
|
"columnName": "rating_count_s5",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s6",
|
|
"columnName": "rating_count_s6",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s7",
|
|
"columnName": "rating_count_s7",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s8",
|
|
"columnName": "rating_count_s8",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s9",
|
|
"columnName": "rating_count_s9",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ratingInfo.count.s10",
|
|
"columnName": "rating_count_s10",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "selfRatingInfo.score",
|
|
"columnName": "self_rating_score",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "selfRatingInfo.comment",
|
|
"columnName": "self_rating_comment",
|
|
"affinity": "TEXT"
|
|
},
|
|
{
|
|
"fieldPath": "selfRatingInfo.tags",
|
|
"columnName": "self_rating_tags",
|
|
"affinity": "BLOB",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "selfRatingInfo.isPrivate",
|
|
"columnName": "self_rating_isPrivate",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"autoGenerate": true,
|
|
"columnNames": [
|
|
"_index"
|
|
]
|
|
},
|
|
"indices": [
|
|
{
|
|
"name": "index_subject_collection_subjectId",
|
|
"unique": true,
|
|
"columnNames": [
|
|
"subjectId"
|
|
],
|
|
"orders": [],
|
|
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_subject_collection_subjectId` ON `${TABLE_NAME}` (`subjectId`)"
|
|
},
|
|
{
|
|
"name": "index_subject_collection_lastUpdated",
|
|
"unique": false,
|
|
"columnNames": [
|
|
"lastUpdated"
|
|
],
|
|
"orders": [
|
|
"DESC"
|
|
],
|
|
"createSql": "CREATE INDEX IF NOT EXISTS `index_subject_collection_lastUpdated` ON `${TABLE_NAME}` (`lastUpdated` DESC)"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"tableName": "episode_collection",
|
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`subjectId` INTEGER NOT NULL, `episodeId` INTEGER NOT NULL, `episodeType` TEXT, `name` TEXT NOT NULL, `nameCn` TEXT NOT NULL, `airDate` INTEGER NOT NULL, `comment` INTEGER NOT NULL, `desc` TEXT NOT NULL, `sort` TEXT NOT NULL, `ep` TEXT, `selfCollectionType` TEXT NOT NULL, `lastUpdated` INTEGER NOT NULL, PRIMARY KEY(`episodeId`), FOREIGN KEY(`subjectId`) REFERENCES `subject_collection`(`subjectId`) ON UPDATE NO ACTION ON DELETE CASCADE )",
|
|
"fields": [
|
|
{
|
|
"fieldPath": "subjectId",
|
|
"columnName": "subjectId",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "episodeId",
|
|
"columnName": "episodeId",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "episodeType",
|
|
"columnName": "episodeType",
|
|
"affinity": "TEXT"
|
|
},
|
|
{
|
|
"fieldPath": "name",
|
|
"columnName": "name",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "nameCn",
|
|
"columnName": "nameCn",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "airDate",
|
|
"columnName": "airDate",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "comment",
|
|
"columnName": "comment",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "desc",
|
|
"columnName": "desc",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "sort",
|
|
"columnName": "sort",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "ep",
|
|
"columnName": "ep",
|
|
"affinity": "TEXT"
|
|
},
|
|
{
|
|
"fieldPath": "selfCollectionType",
|
|
"columnName": "selfCollectionType",
|
|
"affinity": "TEXT",
|
|
"notNull": true
|
|
},
|
|
{
|
|
"fieldPath": "lastUpdated",
|
|
"columnName": "lastUpdated",
|
|
"affinity": "INTEGER",
|
|
"notNull": true
|
|
}
|
|
],
|
|
"primaryKey": {
|
|
"autoGenerate": false,
|
|
"columnNames": [
|
|
"episodeId"
|
|
]
|
|
},
|
|
"indices": [
|
|
{
|
|
"name": "index_episode_collection_subjectId_episodeId",
|
|
"unique": true,
|
|
"columnNames": [
|
|
"subjectId",
|
|
"episodeId"
|
|
],
|
|
"orders": [],
|
|
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_episode_collection_subjectId_episodeId` ON `${TABLE_NAME}` (`subjectId`, `episodeId`)"
|
|
}
|
|
],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "subject_collection",
|
|
"onDelete": "CASCADE",
|
|
"onUpdate": "NO ACTION",
|
|
"columns": [
|
|
"subjectId"
|
|
],
|
|
"referencedColumns": [
|
|
"subjectId"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"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, '9a75048d4b3b55da3ad9767f5dbb83ac')"
|
|
]
|
|
}
|
|
} |