2019-04-28 20:43:52 +00:00
{
"formatVersion" : 1 ,
"database" : {
"version" : 3 ,
2020-02-26 02:01:23 +00:00
"identityHash" : "9f825b1ee281480bedd38b971feac327" ,
2019-04-28 20:43:52 +00:00
"entities" : [
{
"tableName" : "subscriptions" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `service_id` INTEGER NOT NULL, `url` TEXT, `name` TEXT, `avatar_url` TEXT, `subscriber_count` INTEGER, `description` TEXT)" ,
"fields" : [
{
"fieldPath" : "uid" ,
"columnName" : "uid" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "serviceId" ,
"columnName" : "service_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "url" ,
"columnName" : "url" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "name" ,
"columnName" : "name" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "avatarUrl" ,
"columnName" : "avatar_url" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "subscriberCount" ,
"columnName" : "subscriber_count" ,
"affinity" : "INTEGER" ,
"notNull" : false
} ,
{
"fieldPath" : "description" ,
"columnName" : "description" ,
"affinity" : "TEXT" ,
"notNull" : false
}
] ,
"primaryKey" : {
"columnNames" : [
"uid"
] ,
"autoGenerate" : true
} ,
"indices" : [
{
"name" : "index_subscriptions_service_id_url" ,
"unique" : true ,
"columnNames" : [
"service_id" ,
"url"
] ,
"createSql" : "CREATE UNIQUE INDEX `index_subscriptions_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)"
}
] ,
"foreignKeys" : [ ]
} ,
{
"tableName" : "search_history" ,
" c r e a t e S q l ": " C R E A T E T A B L E I F N O T E X I S T S ` $ { T A B L E _ N A M E } ` ( ` i d ` I N T E G E R P R I M A R Y K E Y A U T O I N C R E M E N T N O T N U L L , ` c r e a t i o n _ d a t e ` I N T E G E R , ` s e r v i c e _ i d ` I N T E G E R N O T N U L L , ` s e a r c h ` T E X T ) " ,
"fields" : [
{
"fieldPath" : "id" ,
"columnName" : "id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "creationDate" ,
"columnName" : "creation_date" ,
"affinity" : "INTEGER" ,
"notNull" : false
} ,
{
"fieldPath" : "serviceId" ,
"columnName" : "service_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "search" ,
"columnName" : "search" ,
"affinity" : "TEXT" ,
"notNull" : false
}
] ,
"primaryKey" : {
"columnNames" : [
"id"
] ,
"autoGenerate" : true
} ,
"indices" : [
{
"name" : "index_search_history_search" ,
"unique" : false ,
"columnNames" : [
"search"
] ,
"createSql" : "CREATE INDEX `index_search_history_search` ON `${TABLE_NAME}` (`search`)"
}
] ,
"foreignKeys" : [ ]
} ,
{
"tableName" : "streams" ,
2019-12-16 07:36:04 +00:00
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `service_id` INTEGER NOT NULL, `url` TEXT NOT NULL, `title` TEXT NOT NULL, `stream_type` TEXT NOT NULL, `duration` INTEGER NOT NULL, `uploader` TEXT NOT NULL, `thumbnail_url` TEXT, `view_count` INTEGER, `textual_upload_date` TEXT, `upload_date` INTEGER, `is_upload_date_approximation` INTEGER)" ,
2019-04-28 20:43:52 +00:00
"fields" : [
{
"fieldPath" : "uid" ,
"columnName" : "uid" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "serviceId" ,
"columnName" : "service_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "url" ,
"columnName" : "url" ,
"affinity" : "TEXT" ,
"notNull" : true
} ,
{
"fieldPath" : "title" ,
"columnName" : "title" ,
"affinity" : "TEXT" ,
"notNull" : true
} ,
{
"fieldPath" : "streamType" ,
"columnName" : "stream_type" ,
"affinity" : "TEXT" ,
"notNull" : true
} ,
{
"fieldPath" : "duration" ,
"columnName" : "duration" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "uploader" ,
"columnName" : "uploader" ,
"affinity" : "TEXT" ,
"notNull" : true
} ,
{
"fieldPath" : "thumbnailUrl" ,
"columnName" : "thumbnail_url" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "viewCount" ,
"columnName" : "view_count" ,
"affinity" : "INTEGER" ,
"notNull" : false
} ,
{
"fieldPath" : "textualUploadDate" ,
"columnName" : "textual_upload_date" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "uploadDate" ,
"columnName" : "upload_date" ,
"affinity" : "INTEGER" ,
"notNull" : false
2019-12-16 07:36:04 +00:00
} ,
{
"fieldPath" : "isUploadDateApproximation" ,
"columnName" : "is_upload_date_approximation" ,
"affinity" : "INTEGER" ,
"notNull" : false
2019-04-28 20:43:52 +00:00
}
] ,
"primaryKey" : {
"columnNames" : [
"uid"
] ,
"autoGenerate" : true
} ,
"indices" : [
{
"name" : "index_streams_service_id_url" ,
"unique" : true ,
"columnNames" : [
"service_id" ,
"url"
] ,
"createSql" : "CREATE UNIQUE INDEX `index_streams_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)"
}
] ,
"foreignKeys" : [ ]
} ,
{
"tableName" : "stream_history" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`stream_id` INTEGER NOT NULL, `access_date` INTEGER NOT NULL, `repeat_count` INTEGER NOT NULL, PRIMARY KEY(`stream_id`, `access_date`), FOREIGN KEY(`stream_id`) REFERENCES `streams`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE )" ,
"fields" : [
{
"fieldPath" : "streamUid" ,
"columnName" : "stream_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "accessDate" ,
"columnName" : "access_date" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "repeatCount" ,
"columnName" : "repeat_count" ,
"affinity" : "INTEGER" ,
"notNull" : true
}
] ,
"primaryKey" : {
"columnNames" : [
"stream_id" ,
"access_date"
] ,
"autoGenerate" : false
} ,
"indices" : [
{
"name" : "index_stream_history_stream_id" ,
"unique" : false ,
"columnNames" : [
"stream_id"
] ,
"createSql" : "CREATE INDEX `index_stream_history_stream_id` ON `${TABLE_NAME}` (`stream_id`)"
}
] ,
"foreignKeys" : [
{
"table" : "streams" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"stream_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
} ,
{
"tableName" : "stream_state" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`stream_id` INTEGER NOT NULL, `progress_time` INTEGER NOT NULL, PRIMARY KEY(`stream_id`), FOREIGN KEY(`stream_id`) REFERENCES `streams`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE )" ,
"fields" : [
{
"fieldPath" : "streamUid" ,
"columnName" : "stream_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "progressTime" ,
"columnName" : "progress_time" ,
"affinity" : "INTEGER" ,
"notNull" : true
}
] ,
"primaryKey" : {
"columnNames" : [
"stream_id"
] ,
"autoGenerate" : false
} ,
"indices" : [ ] ,
"foreignKeys" : [
{
"table" : "streams" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"stream_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
} ,
{
"tableName" : "playlists" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT, `thumbnail_url` TEXT)" ,
"fields" : [
{
"fieldPath" : "uid" ,
"columnName" : "uid" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "name" ,
"columnName" : "name" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "thumbnailUrl" ,
"columnName" : "thumbnail_url" ,
"affinity" : "TEXT" ,
"notNull" : false
}
] ,
"primaryKey" : {
"columnNames" : [
"uid"
] ,
"autoGenerate" : true
} ,
"indices" : [
{
"name" : "index_playlists_name" ,
"unique" : false ,
"columnNames" : [
"name"
] ,
"createSql" : "CREATE INDEX `index_playlists_name` ON `${TABLE_NAME}` (`name`)"
}
] ,
"foreignKeys" : [ ]
} ,
{
"tableName" : "playlist_stream_join" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlist_id` INTEGER NOT NULL, `stream_id` INTEGER NOT NULL, `join_index` INTEGER NOT NULL, PRIMARY KEY(`playlist_id`, `join_index`), FOREIGN KEY(`playlist_id`) REFERENCES `playlists`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY(`stream_id`) REFERENCES `streams`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)" ,
"fields" : [
{
"fieldPath" : "playlistUid" ,
"columnName" : "playlist_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "streamUid" ,
"columnName" : "stream_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "index" ,
"columnName" : "join_index" ,
"affinity" : "INTEGER" ,
"notNull" : true
}
] ,
"primaryKey" : {
"columnNames" : [
"playlist_id" ,
"join_index"
] ,
"autoGenerate" : false
} ,
"indices" : [
{
"name" : "index_playlist_stream_join_playlist_id_join_index" ,
"unique" : true ,
"columnNames" : [
"playlist_id" ,
"join_index"
] ,
"createSql" : "CREATE UNIQUE INDEX `index_playlist_stream_join_playlist_id_join_index` ON `${TABLE_NAME}` (`playlist_id`, `join_index`)"
} ,
{
"name" : "index_playlist_stream_join_stream_id" ,
"unique" : false ,
"columnNames" : [
"stream_id"
] ,
"createSql" : "CREATE INDEX `index_playlist_stream_join_stream_id` ON `${TABLE_NAME}` (`stream_id`)"
}
] ,
"foreignKeys" : [
{
"table" : "playlists" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"playlist_id"
] ,
"referencedColumns" : [
"uid"
]
} ,
{
"table" : "streams" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"stream_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
} ,
{
"tableName" : "remote_playlists" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `service_id` INTEGER NOT NULL, `name` TEXT, `url` TEXT, `thumbnail_url` TEXT, `uploader` TEXT, `stream_count` INTEGER)" ,
"fields" : [
{
"fieldPath" : "uid" ,
"columnName" : "uid" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "serviceId" ,
"columnName" : "service_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "name" ,
"columnName" : "name" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "url" ,
"columnName" : "url" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "thumbnailUrl" ,
"columnName" : "thumbnail_url" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "uploader" ,
"columnName" : "uploader" ,
"affinity" : "TEXT" ,
"notNull" : false
} ,
{
"fieldPath" : "streamCount" ,
"columnName" : "stream_count" ,
"affinity" : "INTEGER" ,
"notNull" : false
}
] ,
"primaryKey" : {
"columnNames" : [
"uid"
] ,
"autoGenerate" : true
} ,
"indices" : [
{
"name" : "index_remote_playlists_name" ,
"unique" : false ,
"columnNames" : [
"name"
] ,
"createSql" : "CREATE INDEX `index_remote_playlists_name` ON `${TABLE_NAME}` (`name`)"
} ,
{
"name" : "index_remote_playlists_service_id_url" ,
"unique" : true ,
"columnNames" : [
"service_id" ,
"url"
] ,
"createSql" : "CREATE UNIQUE INDEX `index_remote_playlists_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)"
}
] ,
"foreignKeys" : [ ]
} ,
{
"tableName" : "feed" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`stream_id` INTEGER NOT NULL, `subscription_id` INTEGER NOT NULL, PRIMARY KEY(`stream_id`, `subscription_id`), FOREIGN KEY(`stream_id`) REFERENCES `streams`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY(`subscription_id`) REFERENCES `subscriptions`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)" ,
"fields" : [
{
"fieldPath" : "streamId" ,
"columnName" : "stream_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "subscriptionId" ,
"columnName" : "subscription_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
}
] ,
"primaryKey" : {
"columnNames" : [
"stream_id" ,
"subscription_id"
] ,
"autoGenerate" : false
} ,
"indices" : [
{
"name" : "index_feed_subscription_id" ,
"unique" : false ,
"columnNames" : [
"subscription_id"
] ,
"createSql" : "CREATE INDEX `index_feed_subscription_id` ON `${TABLE_NAME}` (`subscription_id`)"
}
] ,
"foreignKeys" : [
{
"table" : "streams" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"stream_id"
] ,
"referencedColumns" : [
"uid"
]
} ,
{
"table" : "subscriptions" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"subscription_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
} ,
{
"tableName" : "feed_group" ,
2020-02-26 02:01:23 +00:00
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `icon_id` INTEGER NOT NULL, `sort_order` INTEGER NOT NULL)" ,
2019-04-28 20:43:52 +00:00
"fields" : [
{
"fieldPath" : "uid" ,
"columnName" : "uid" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "name" ,
"columnName" : "name" ,
"affinity" : "TEXT" ,
"notNull" : true
} ,
{
2019-04-28 20:43:54 +00:00
"fieldPath" : "icon" ,
2019-04-28 20:43:52 +00:00
"columnName" : "icon_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
2020-02-26 02:01:23 +00:00
} ,
{
"fieldPath" : "sortOrder" ,
"columnName" : "sort_order" ,
"affinity" : "INTEGER" ,
"notNull" : true
2019-04-28 20:43:52 +00:00
}
] ,
"primaryKey" : {
"columnNames" : [
"uid"
] ,
"autoGenerate" : true
} ,
2020-02-26 02:01:23 +00:00
"indices" : [
{
"name" : "index_feed_group_sort_order" ,
"unique" : false ,
"columnNames" : [
"sort_order"
] ,
"createSql" : "CREATE INDEX `index_feed_group_sort_order` ON `${TABLE_NAME}` (`sort_order`)"
}
] ,
2019-04-28 20:43:52 +00:00
"foreignKeys" : [ ]
} ,
{
"tableName" : "feed_group_subscription_join" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`group_id` INTEGER NOT NULL, `subscription_id` INTEGER NOT NULL, PRIMARY KEY(`group_id`, `subscription_id`), FOREIGN KEY(`group_id`) REFERENCES `feed_group`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY(`subscription_id`) REFERENCES `subscriptions`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)" ,
"fields" : [
{
"fieldPath" : "feedGroupId" ,
"columnName" : "group_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "subscriptionId" ,
"columnName" : "subscription_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
}
] ,
"primaryKey" : {
"columnNames" : [
"group_id" ,
"subscription_id"
] ,
"autoGenerate" : false
} ,
"indices" : [
{
"name" : "index_feed_group_subscription_join_subscription_id" ,
"unique" : false ,
"columnNames" : [
"subscription_id"
] ,
"createSql" : "CREATE INDEX `index_feed_group_subscription_join_subscription_id` ON `${TABLE_NAME}` (`subscription_id`)"
}
] ,
"foreignKeys" : [
{
"table" : "feed_group" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"group_id"
] ,
"referencedColumns" : [
"uid"
]
} ,
{
"table" : "subscriptions" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"subscription_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
2019-12-16 07:36:04 +00:00
} ,
{
"tableName" : "feed_last_updated" ,
"createSql" : "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`subscription_id` INTEGER NOT NULL, `last_updated` INTEGER, PRIMARY KEY(`subscription_id`), FOREIGN KEY(`subscription_id`) REFERENCES `subscriptions`(`uid`) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED)" ,
"fields" : [
{
"fieldPath" : "subscriptionId" ,
"columnName" : "subscription_id" ,
"affinity" : "INTEGER" ,
"notNull" : true
} ,
{
"fieldPath" : "lastUpdated" ,
"columnName" : "last_updated" ,
"affinity" : "INTEGER" ,
"notNull" : false
}
] ,
"primaryKey" : {
"columnNames" : [
"subscription_id"
] ,
"autoGenerate" : false
} ,
"indices" : [ ] ,
"foreignKeys" : [
{
"table" : "subscriptions" ,
"onDelete" : "CASCADE" ,
"onUpdate" : "CASCADE" ,
"columns" : [
"subscription_id"
] ,
"referencedColumns" : [
"uid"
]
}
]
2019-04-28 20:43:52 +00:00
}
] ,
2019-12-16 07:36:04 +00:00
"views" : [ ] ,
2019-04-28 20:43:52 +00:00
"setupQueries" : [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)" ,
2020-02-26 02:01:23 +00:00
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9f825b1ee281480bedd38b971feac327')"
2019-04-28 20:43:52 +00:00
]
}
}