From 8f157be7e016c82687d38ff0cc4379f8de6cb28e Mon Sep 17 00:00:00 2001 From: Samuel Wu Date: Thu, 27 Oct 2022 12:15:36 +1100 Subject: [PATCH] Revert changes --- .../5.json | 26 +++++-------------- .../database/feed/model/FeedGroupEntity.kt | 2 +- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/app/schemas/org.schabi.newpipe.database.AppDatabase/5.json b/app/schemas/org.schabi.newpipe.database.AppDatabase/5.json index eeebdeb49..9a1c62995 100644 --- a/app/schemas/org.schabi.newpipe.database.AppDatabase/5.json +++ b/app/schemas/org.schabi.newpipe.database.AppDatabase/5.json @@ -71,7 +71,6 @@ "service_id", "url" ], - "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_subscriptions_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)" } ], @@ -79,8 +78,14 @@ }, { "tableName": "search_history", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`creation_date` INTEGER, `service_id` INTEGER NOT NULL, `search` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)", + "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", @@ -98,12 +103,6 @@ "columnName": "search", "affinity": "TEXT", "notNull": false - }, - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true } ], "primaryKey": { @@ -119,7 +118,6 @@ "columnNames": [ "search" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_search_history_search` ON `${TABLE_NAME}` (`search`)" } ], @@ -222,7 +220,6 @@ "service_id", "url" ], - "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_streams_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)" } ], @@ -265,7 +262,6 @@ "columnNames": [ "stream_id" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_stream_history_stream_id` ON `${TABLE_NAME}` (`stream_id`)" } ], @@ -357,7 +353,6 @@ "columnNames": [ "name" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_playlists_name` ON `${TABLE_NAME}` (`name`)" } ], @@ -401,7 +396,6 @@ "playlist_id", "join_index" ], - "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_playlist_stream_join_playlist_id_join_index` ON `${TABLE_NAME}` (`playlist_id`, `join_index`)" }, { @@ -410,7 +404,6 @@ "columnNames": [ "stream_id" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_playlist_stream_join_stream_id` ON `${TABLE_NAME}` (`stream_id`)" } ], @@ -499,7 +492,6 @@ "columnNames": [ "name" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_remote_playlists_name` ON `${TABLE_NAME}` (`name`)" }, { @@ -509,7 +501,6 @@ "service_id", "url" ], - "orders": [], "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_remote_playlists_service_id_url` ON `${TABLE_NAME}` (`service_id`, `url`)" } ], @@ -546,7 +537,6 @@ "columnNames": [ "subscription_id" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_feed_subscription_id` ON `${TABLE_NAME}` (`subscription_id`)" } ], @@ -617,7 +607,6 @@ "columnNames": [ "sort_order" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_feed_group_sort_order` ON `${TABLE_NAME}` (`sort_order`)" } ], @@ -654,7 +643,6 @@ "columnNames": [ "subscription_id" ], - "orders": [], "createSql": "CREATE INDEX IF NOT EXISTS `index_feed_group_subscription_join_subscription_id` ON `${TABLE_NAME}` (`subscription_id`)" } ], diff --git a/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedGroupEntity.kt b/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedGroupEntity.kt index c7415ace0..1dd26946a 100644 --- a/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedGroupEntity.kt +++ b/app/src/main/java/org/schabi/newpipe/database/feed/model/FeedGroupEntity.kt @@ -24,7 +24,7 @@ data class FeedGroupEntity( var icon: FeedGroupIcon, @ColumnInfo(name = SORT_ORDER) - var sortOrder: Long = -1, + var sortOrder: Long = -1 ) { companion object { const val FEED_GROUP_TABLE = "feed_group"