-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d93232
commit 5077f86
Showing
4 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
ALTER TABLE member_infos ALTER COLUMN birthday | ||
TYPE VARCHAR (11) USING CASE | ||
-- locale_id == 1 → en | ||
WHEN locale_id = '1' THEN TO_CHAR(birthday, 'MM/DD/YYYY') | ||
-- locale_id == 2 → ja | ||
WHEN locale_id = '2' THEN TO_CHAR(birthday, 'YYYY年MM月DD日') | ||
END; |
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,5 @@ | ||
ALTER TABLE member_infos ALTER COLUMN birthday | ||
TYPE date USING CASE | ||
WHEN birthday ~ E'^\\d{1,2}/\\d{1,2}/\\d{4}$' THEN TO_DATE(birthday, 'MM/DD/YYYY') | ||
WHEN birthday ~ E'^\\d{4}年\\d{1,2}月\\d{1,2}日$' THEN TO_DATE(birthday, 'YYYY年MM月DD日') | ||
END; |