From 55001ddcf10bc83425dddc457aae8ab5c0d0fb64 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Thu, 6 Oct 2022 10:05:43 +1100 Subject: [PATCH] Ignore conflicts on performers_galleries --- pkg/sqlite/migrations/35_assoc_tables.up.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/sqlite/migrations/35_assoc_tables.up.sql b/pkg/sqlite/migrations/35_assoc_tables.up.sql index ff6e8f9a9..f052ad7aa 100644 --- a/pkg/sqlite/migrations/35_assoc_tables.up.sql +++ b/pkg/sqlite/migrations/35_assoc_tables.up.sql @@ -386,7 +386,8 @@ INSERT INTO `performers_galleries_new` SELECT `performer_id`, `gallery_id` - FROM `performers_galleries`; + FROM `performers_galleries` WHERE true + ON CONFLICT (`gallery_id`, `performer_id`) DO NOTHING; DROP TABLE `performers_galleries`; ALTER TABLE `performers_galleries_new` rename to `performers_galleries`;