-
Notifications
You must be signed in to change notification settings - Fork 2
테스트 서버용 더미데이터 생성 쿼리
-- 유저 두 명 생성 insert into breaking.user value (1,1000,"profileurl1","[email protected]","닉네임1","profileurl","password","01011111111","실명1","PRESS","상태메시지1","username1"); insert into breaking.user value (2,1000,"profileurl2","[email protected]","닉네임2","profileurl2","password2","01022222222","실명2","PRESS","상태메시지2","username2"); insert into breaking.user value (3,1000,"profileurl3","[email protected]","닉네임3","profileurl3","password3","01033333333","실명3","PRESS","상태메시지3","username3");
-- 유저 1이 유저 2를 팔로우한다. insert into breaking.follow value (1,2,1); -- 유저 1이 유저 3를 팔로우한다. insert into breaking.follow value (2,3,1); -- 유저 3이 유저 1를 팔로우한다. insert into breaking.follow value (3,1,3);
-- 1번 유저 게시글 7개 생성 insert into breaking.post value (1,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (3,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (5,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title 나는 깻묵 제목입니다.", 0, 1); insert into breaking.post value (7,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (9,null,null,"나는 깻묵 본문입니다.",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (11,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (13,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (15,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (17,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1); insert into breaking.post value (19,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 1);
-- 2번 유저 게시글 insert into breaking.post value (2,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (4,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (6,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (8,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (10,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (12,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (14,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (16,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (18,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2); insert into breaking.post value (20,null,null,"content",null,false,false,false,false,"address",5555,5555,"region_1depth_name","region_2depth_name","FREE",1000,"hello", "title", 0, 2);
-- 1번 유저의 1번 게시글에 댓글을 추가한다. insert into breaking.comment value(1, null, null, "commentcontent1", null, null, 1, 1); insert into breaking.comment value(2, null, null, "commentcontent2", null, null, 1, 1); insert into breaking.comment value(3, null, null, "commentcontent3", null, null, 1, 1); insert into breaking.comment value(4, null, null, "commentcontent4", null, null, 1, 1); -- 1번 댓글에 대댓글 insert into breaking.comment value(5, null, null, "commentcontent5", null, 1, 1, 1); insert into breaking.comment value(6, null, null, "commentcontent6", null, 1, 1, 2); insert into breaking.comment value(7, null, null, "commentcontent7", null, 1, 1, 2);
-- 2번 유저의 북마크 insert into breaking.bookmark value(1, 1, 2); insert into breaking.bookmark value(2, 2, 2); insert into breaking.bookmark value(3, 3, 2);
-- 2번 유저의 게시글 구매 insert into breaking.purchase value(1, 1000, 1, 2); insert into breaking.purchase value(2, 1000, 2, 2); insert into breaking.purchase value(3, 1000, 3, 2);
-- insert into breaking.comment value (1, null, null, null, null, 1, 1); -- select * from user; -- select * from post; -- select * from follow -- delete from comment where comment_id=1; -- select * from comment;