"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",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `creation_date` INTEGER, `service_id` INTEGER NOT NULL, `search` TEXT)",
"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",
"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)",
"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
}
],
"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)",
"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",
"createSql":"CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `icon_id` INTEGER NOT NULL)",