-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #431 from Namo-log/feature/429
[Bug Fix/429] participant의 palette column 삭제 및 anonymous로 이동
- Loading branch information
Showing
13 changed files
with
67 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...-v2/src/main/resources/db/migration/dev/V1.1.8__Add_palette_column_to_anonymous_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- V1.1.8__Add_palette_column_to_anonymous_table | ||
|
||
-- 1. anonymous에 palette_id 추가 | ||
ALTER TABLE anonymous | ||
ADD COLUMN palette_id BIGINT, | ||
ADD CONSTRAINT fk_anonymous_palette FOREIGN KEY (palette_id) REFERENCES palette (id); | ||
|
||
-- 2. participant의 palette_id를 anonymous의 palette_id로 복사 | ||
UPDATE anonymous a | ||
JOIN participant p ON a.id = p.anonymous_id | ||
SET a.palette_id = p.palette_id | ||
WHERE p.palette_id IS NOT NULL; | ||
|
||
ALTER TABLE anonymous | ||
MODIFY COLUMN palette_id BIGINT NOT NULL; |
7 changes: 7 additions & 0 deletions
7
...l-v2/src/main/resources/db/migration/dev/V1.1.9__Drop_palette_column_from_particiapnt.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- V1.1.9__Drop_palette_column_from_participant_table | ||
|
||
SET foreign_key_checks = 0; | ||
ALTER TABLE participant DROP FOREIGN KEY FK7q1eb1aao98hr1nsa85agu6x5; | ||
ALTER TABLE participant DROP COLUMN palette_id; | ||
SET foreign_key_checks = 1; | ||
|