-
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.
Merge pull request #66 from taco-official/KL-180/uuid-관련-문제-해결
fix(KL-180): UUID related problem
- Loading branch information
Showing
5 changed files
with
160 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
/* Member */ | ||
INSERT INTO member(id, uuid, name, tag, description, role, created_at) | ||
VALUES (101, CAST(X'550e8400e29b41d4a716446655440000' AS UUID), 'test', '0001', '테스트입니다.', 'USER', CURRENT_TIMESTAMP), | ||
(102, RANDOM_UUID(), 'dummy1', '0002', '더미1', 'USER', CURRENT_TIMESTAMP), | ||
(103, RANDOM_UUID(), 'dummy2', '0003', '더미2', 'USER', CURRENT_TIMESTAMP); | ||
|
||
/* Like */ | ||
|
||
|
||
/* Region */ | ||
INSERT INTO region(region_id, name) | ||
VALUES (400, '동북아시아'), | ||
(401, '동남아시아'), | ||
(402, '기타'); | ||
|
||
INSERT INTO currency (currency_id, code, unit) | ||
VALUES (438, 'JPY', '엔'), | ||
(439, 'CNH', '위안'), | ||
(440, 'TWD', '달러'), | ||
(441, 'THB', '바트'), | ||
(442, 'VND', '동'), | ||
(443, 'PHP', '페소'), | ||
(444, 'SGD', '달러'), | ||
(445, 'IDR', '루피아'), | ||
(446, 'MYR', '링깃'), | ||
(447, 'USD', '달러'); | ||
|
||
INSERT INTO country(country_id, region_id, name, code, wallpaper, currency_id) | ||
VALUES (403, 400, '일본', 'JP', 'image/sample', 438), | ||
(404, 400, '중국', 'CN', 'image/sample', 439), | ||
(405, 400, '대만', 'TW', 'image/sample', 440), | ||
(406, 401, '태국', 'TH', 'image/sample', 441), | ||
(407, 401, '베트남', 'VN', 'image/sample', 442), | ||
(408, 401, '필리핀', 'PH', 'image/sample', 443), | ||
(409, 401, '싱가포르', 'SG', 'image/sample', 444), | ||
(410, 401, '인도네시아', 'ID', 'image/sample', 445), | ||
(411, 401, '말레이시아', 'MY', 'image/sample', 446), | ||
(412, 402, '괌', 'GU', 'image/sample', 447), | ||
(413, 402, '미국', 'US', 'image/sample', 447); | ||
|
||
INSERT INTO city (city_id, country_id, name) | ||
VALUES (414, 403, '오사카'), | ||
(415, 403, '교토'), | ||
(416, 403, '도쿄'), | ||
(417, 403, '후쿠오카'), | ||
(418, 403, '오키나와'), | ||
(419, 403, '삿포로'), | ||
(420, 403, '나고야'), | ||
(421, 404, '홍콩'), | ||
(422, 404, '상하이'), | ||
(423, 404, '베이징'), | ||
(424, 405, '타이베이'), | ||
(425, 406, '방콕'), | ||
(426, 406, '치앙마이'), | ||
(427, 406, '푸켓'), | ||
(428, 407, '다낭'), | ||
(429, 407, '나트랑'), | ||
(430, 407, '호치민'), | ||
(431, 407, '하노이'), | ||
(432, 408, '세부'), | ||
(433, 408, '보라카이'), | ||
(434, 409, '싱가포르'), | ||
(435, 410, '발리'), | ||
(436, 411, '코타키나발루'), | ||
(437, 411, '쿠알라룸푸르'), | ||
(448, 412, '투몬'), | ||
(449, 413, '뉴욕'), | ||
(450, 413, '로스엔젤레스'), | ||
(451, 413, '하와이'); | ||
|
||
/* Category */ | ||
INSERT | ||
INTO category(category_id, name) | ||
VALUES (300, '식품'), | ||
(301, '의류'), | ||
(302, '잡화'), | ||
(303, '화장품'); | ||
|
||
INSERT INTO subcategory (subcategory_id, name, category_id) | ||
VALUES | ||
-- 식품 카테고리 (category_id: 300) | ||
(310, '라면 및 즉석식품', 300), | ||
(311, '스낵 및 과자', 300), | ||
(312, '조미료 및 소스', 300), | ||
(313, '보충제 및 건강식품', 300), | ||
(314, '음료 및 차', 300), | ||
(315, '주류', 300), | ||
|
||
-- 의류 카테고리 (category_id: 301) | ||
(320, '상의', 301), | ||
(321, '하의', 301), | ||
(322, '아우터', 301), | ||
(323, '원피스', 301), | ||
(324, '신발', 301), | ||
(325, '액세사리', 301), | ||
(326, '쥬얼리', 301), | ||
|
||
-- 잡화 카테고리 (category_id: 302) | ||
(330, '일반의약품', 302), | ||
(331, '주방잡화', 302), | ||
(332, '욕실잡화', 302), | ||
(333, '문구 및 완구', 302), | ||
|
||
-- 화장품 카테고리 (category_id: 303) | ||
(340, '스킨케어', 303), | ||
(341, '메이크업', 303), | ||
(342, '헤어케어', 303), | ||
(343, '바디케어', 303), | ||
(344, '위생용품', 303); | ||
|
||
/* tag */ | ||
INSERT INTO tag (tag_id, name) | ||
VALUES (350, '편의점'), | ||
(351, '고수'); | ||
|
||
INSERT INTO subcategory_tag (subcategory_tag_id, subcategory_id, tag_id) | ||
VALUES | ||
--서브카테고리 필터 관계 테이블 | ||
-- 라면 및 즉석식품 - 필터 | ||
(360, 310, 350), | ||
(361, 310, 351), | ||
-- 스낵 및 과자 - 필터 | ||
(362, 311, 350), | ||
(363, 311, 351), | ||
--조미료 및 소스 - 필터 | ||
(364, 312, 350), | ||
(365, 312, 351), | ||
-- 보충제 및 건강식품 - 필터 | ||
(366, 313, 350), | ||
-- 음료 및 차 - 필터 | ||
(367, 314, 350), | ||
-- 주류 -필터 | ||
(368, 315, 350); | ||
|
||
/* Product */ | ||
INSERT INTO product(product_id, member_id, name, description, address, price, like_count, rating, | ||
city_id, subcategory_id, currency_id, created_at) | ||
VALUES (101, 102, '곤약젤리', '탱글탱글 맛있는 곤약젤리', '신사이바시 메가돈키호테', 1000, 0, 5.0, 414, 311, 438, now()), | ||
(102, 102, '여름 원피스', '시원하고 여름 휴양지 느낌의 원피스', '방콕 짜뚜짝 시장', 300, 333, 4.5, 425, 323, 441, now()), | ||
(103, 103, '하오하오 봉지라면 핑크색', '새우맛이 나는 맛있는 라면', '롯데마트 나트랑', 15000, 500, 5.0, 429, 310, 442, now()), | ||
(390, 101, '왕족발 보쌈 과자', '맛있는 왕족발 보쌈 과자', '상하이 장충동', 3000, 10, 3.0, 422, 311, 439, now()); | ||
|
||
/* Comment */ | ||
INSERT INTO comment(comment_id, product_id, member_id, content, created_at) | ||
VALUES (500, 101, 101, '이거 정말 맛있는데 표현할 방법이 읎네.', now()), | ||
(501, 390, 102, '이거 정말 맛없는데 표현할 방법이 읎네.', now()), | ||
(502, 390, 103, '이거 정말 좋은데 표현할 방법이 읎네.', now()); | ||
|
||
/* Notification */ | ||
INSERT INTO notification(notification_id, is_read, created_at, comment_id) | ||
VALUES (700, false, now(), 500), | ||
(701, false, now(), 501), | ||
(702, false, now(), 502); |
6 changes: 3 additions & 3 deletions
6
src/main/resources/database/data.sql → src/main/resources/database/data-mysql.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