From 67f2f4b5d6bf27946d2600c4d87637c4199693b1 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Thu, 2 Jul 2026 11:31:15 +0900 Subject: [PATCH] fix(db): make blog cleanup migration idempotent --- db/migrations/V021__FixBlogPostsAdvertisingCompliance.sql | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/migrations/V021__FixBlogPostsAdvertisingCompliance.sql b/db/migrations/V021__FixBlogPostsAdvertisingCompliance.sql index 351e051..e85a790 100644 --- a/db/migrations/V021__FixBlogPostsAdvertisingCompliance.sql +++ b/db/migrations/V021__FixBlogPostsAdvertisingCompliance.sql @@ -197,7 +197,8 @@ $$, 1, true, NOW() -); +) +ON CONFLICT (slug) DO NOTHING; -- 2. 이번달 부가가치세 신고 INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at) @@ -399,7 +400,8 @@ $$, 1, true, NOW() -); +) +ON CONFLICT (slug) DO NOTHING; -- 3. 프리랜서를 위한 종합소득세 신고 INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at) @@ -636,3 +638,4 @@ $$, true, NOW() ); +