From d7ca51b7414a1dac0cd595517e5f5962efbe64b1 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Thu, 2 Jul 2026 12:29:06 +0900 Subject: [PATCH] fix(db): make blog accuracy migration idempotent --- db/migrations/V022__ApplyAccuracyPrincipleToBlogs.sql | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/db/migrations/V022__ApplyAccuracyPrincipleToBlogs.sql b/db/migrations/V022__ApplyAccuracyPrincipleToBlogs.sql index be209d1..de6fb97 100644 --- a/db/migrations/V022__ApplyAccuracyPrincipleToBlogs.sql +++ b/db/migrations/V022__ApplyAccuracyPrincipleToBlogs.sql @@ -207,7 +207,8 @@ $$, 1, true, NOW() -); +) +ON CONFLICT (slug) DO NOTHING; -- 2. 이번달 부가가치세 신고 INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at) @@ -414,7 +415,8 @@ $$, 1, true, NOW() -); +) +ON CONFLICT (slug) DO NOTHING; -- 3. 프리랜서를 위한 종합소득세 신고 INSERT INTO blog_posts (title, slug, content, category_id, is_published, created_at) @@ -672,4 +674,5 @@ $$, 1, true, NOW() -); +) +ON CONFLICT (slug) DO NOTHING;