Skip to content

Commit 1ea621e

Browse files
committed
fix: 이미지 더미 데이터 삭제 및 마이그레이션 쿼리 수정
1 parent d714f2b commit 1ea621e

File tree

4 files changed

+2
-33
lines changed

4 files changed

+2
-33
lines changed

src/main/resources/db/migration/V9__migrate_cheer_story_images.sql renamed to src/main/resources/db/migration/V8__migrate_cheer_story_images.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
INSERT INTO cheer_image (cheer_id, image_key, order_index, created_at)
22
SELECT c.id,
3-
CONCAT('cheer/', c.id, '/', c.image_key),
3+
CONCAT('cheer/', c.id, '/', REGEXP_REPLACE(c.image_key, '.*\/', '')),
44
1,
55
c.created_at
66
FROM cheer c
@@ -13,7 +13,7 @@ WHERE c.image_key IS NOT NULL
1313

1414
INSERT INTO story_image (story_id, image_key, order_index, created_at)
1515
SELECT s.id,
16-
CONCAT('story/', s.id, '/', s.image_key),
16+
CONCAT('story/', s.id, '/', REGEXP_REPLACE(s.image_key, '.*\/', '')),
1717
1,
1818
s.created_at
1919
FROM story s

src/main/resources/db/seed/dev/V8__dev_add_cheer_and_story_image.sql

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/main/resources/db/seed/local/V8__local_add_cheer_and_story_image.sql

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/main/resources/db/seed/prod/V8__prod_add_cheer_and_story_image.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)