Skip to content

Commit

Permalink
feat: 게스트 계정 추가하는 SQL문 작성
Browse files Browse the repository at this point in the history
- Users 테이블에 게스트 계정 정보가 없을 때, 게스트 계정을 추가하는 SQL문 작성
  • Loading branch information
SSung023 committed Oct 24, 2024
1 parent ddece36 commit 247a502
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/main/resources/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,17 @@ FROM (SELECT 1 AS identifier,
'프로필을 꾸밀 수 있는 프레임입니다.',
'무섭지롱 프레임',
'PROFILE_FRAME') AS new_items
WHERE (SELECT COUNT(*) FROM item) < 3;
WHERE (SELECT COUNT(*) FROM item) < 3;

INSERT INTO users (`point`, user_id, nickname, information, identifier, tags, provider_info, `role`)
SELECT 0,
104,
'Guest',
'자기 소개입니다.',
'Guest',
'Java,Spring',
'GITHUB',
'USER'
WHERE NOT EXISTS (SELECT 1
FROM users
WHERE identifier = 'Guest');

0 comments on commit 247a502

Please sign in to comment.