diff --git a/pkg/sqlite/migrations/35_assoc_tables.up.sql b/pkg/sqlite/migrations/35_assoc_tables.up.sql index 8bbb40d19..ff6e8f9a9 100644 --- a/pkg/sqlite/migrations/35_assoc_tables.up.sql +++ b/pkg/sqlite/migrations/35_assoc_tables.up.sql @@ -199,7 +199,8 @@ INSERT INTO `movies_scenes_new` `movie_id`, `scene_id`, `scene_index` - FROM `movies_scenes`; + FROM `movies_scenes` WHERE true + ON CONFLICT (`movie_id`, `scene_id`) DO NOTHING; DROP TABLE `movies_scenes`; ALTER TABLE `movies_scenes_new` rename to `movies_scenes`;