]> uap-core.de Git - rssreader.git/commitdiff
fix new feed pos number generation
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Wed, 5 Nov 2025 18:55:08 +0000 (19:55 +0100)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Wed, 5 Nov 2025 18:55:08 +0000 (19:55 +0100)
rss-application/src/main/kotlin/de/unixwork/rssreader/Database.kt

index 1cac918ef0fe89ce480cdf3f777f58a939fc6adc..c6eab9464381b574393691d1ebc74db61caa4098 100644 (file)
@@ -200,7 +200,7 @@ object Database {
         var feedCol: FeedCollection
         dataSource.connection.use { connection ->
             connection.prepareStatement("""
-            insert into feedcollections (group_id, pos, name, update_interval, max_item_age, item_state_mode) select ?, coalesce(max(pos), 0)+1, ?, ?, ?, ? from groups
+            insert into feedcollections (group_id, pos, name, update_interval, max_item_age, item_state_mode) select ?, coalesce(max(pos), 0)+1, ?, ?, ?, ? from feedcollections
             """.trimIndent(), Statement.RETURN_GENERATED_KEYS).use { stmt ->
                 stmt.setInt(1, parent.id)
                 stmt.setString(2, name)