-
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 #38 from shortintern2020-A-labyrinth/testcase
1-createTable close#37
- Loading branch information
Showing
1 changed file
with
69 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,93 @@ | ||
create table users ( | ||
id serial primary key, | ||
name varchar(30) not null, | ||
mail varchar(50) not null, | ||
filterlevel smallint | ||
id serial primary key, | ||
name varchar(30) not null, | ||
mail varchar(50) not null, | ||
filterlevel smallint | ||
); | ||
|
||
insert into users(name, mail, filterlevel) values | ||
('ichigo.chocomint', '[email protected]', 1), | ||
('banana.chocomint', '[email protected]', 2), | ||
('pinapple.chocomint', '[email protected]', 3) | ||
; | ||
|
||
create table sample ( | ||
id serial primary key, | ||
name varchar(30) not null, | ||
mail varchar(50) not null, | ||
filterlevel smallint | ||
id serial primary key, | ||
name varchar(30) not null, | ||
mail varchar(50) not null, | ||
filterlevel smallint | ||
); | ||
|
||
insert into sample(name, mail, filterlevel) values | ||
('ichigo.chocomint', '[email protected]', 1), | ||
('banana.chocomint', '[email protected]', 2), | ||
('pinapple.chocomint', '[email protected]', 3) | ||
; | ||
|
||
create table friend ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
name varchar(30) not null, | ||
latestemolog varchar(30), | ||
updated_at timestamp | ||
id serial primary key, | ||
userid INTEGER not null, | ||
name varchar(30) not null, | ||
latestemolog varchar(30), | ||
updated_at timestamp | ||
); | ||
|
||
insert into friend(userid, name, latestemolog, updated_at) values | ||
(123, 'ichigo.chocomint', '🍎🍋🍇', 2020-08-24 16:24:29.353806), | ||
(456, 'banana.chocomint', '🍈🍓🍌', 2020-08-25 16:24:29.353806), | ||
(789, 'pinapple.chocomint', '🍊🥝', 2020-08-26 16:24:29.353806) | ||
; | ||
|
||
create table emolog ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
friendid INTEGER not null, | ||
created_at timestamp, | ||
contents varchar(30) | ||
id serial primary key, | ||
userid INTEGER not null, | ||
friendid INTEGER not null, | ||
created_at timestamp, | ||
contents varchar(30) | ||
); | ||
|
||
insert into emolog(userid, friendid, created_at, contents) values | ||
(123, 456, 2020-08-26 16:24:29.353806, U+1F600) | ||
; | ||
create table chat ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
friendid INTEGER not null, | ||
contents varchar(30), | ||
create_at timestamp | ||
); | ||
|
||
create table requestfriend ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
requestfriendid INTEGER not null, | ||
create_at timestamp | ||
); | ||
|
||
create table talk ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
friendid INTEGER not null, | ||
contents varchar(30), | ||
create_at timestamp | ||
create table emojicode ( | ||
keyword serial primary key, | ||
emoji_code varchar(30) | ||
); | ||
|
||
insert into talk(userid, friendid, contents, create_at) values | ||
(123, 456, "こんにちは", 2020-08-26 16:24:29.353806) | ||
insert into users(name, mail, filterlevel) values | ||
('ichigo.chocomint', '[email protected]', 1), | ||
('banana.chocomint', '[email protected]', 2), | ||
('pinapple.chocomint', '[email protected]', 3), | ||
('apple.chocomint', '[email protected]', 4), | ||
('lemon.chocomint', '[email protected]', 5) | ||
; | ||
|
||
create table requestfriend ( | ||
id serial primary key, | ||
userid INTEGER not null, | ||
requestfriendid INTEGER not null, | ||
contents varchar(30), | ||
create_at timestamp | ||
); | ||
insert into friend(userid, name, latestemolog, updated_at) values | ||
(123, 'ichigo.chocomint', '🍎🍋🍇', '2001-01-01 01:01:01'), | ||
(456, 'banana.chocomint', '🍈🍓🍌', '2002-02-02 02:02:02'), | ||
(789, 'pinapple.chocomint', '🍊🥝🍎', '2003-03-03 03:03:03'), | ||
(321, 'apple.chocomint', '🍋🍇🍈', '2004-04-04 04:04:04'), | ||
(654, 'lemon.chocomint', '🍓🍌🍊', '2005-05-05 05:05:05') | ||
; | ||
|
||
insert table requestfriend() values | ||
() | ||
insert into emolog(userid, friendid, created_at, contents) values | ||
(1, 2, '2006-06-06 06:06:06', '⛰🌋🗻'), | ||
(2, 1, '2007-07-07 07:07:07', '🏘🏠🏡'), | ||
(1, 3, '2008-08-08 08:08:08', '🐒🦍🐒'), | ||
(3, 1, '2009-09-09 09:09:09', '⭐️🌟⭐️'), | ||
(2, 3, '2010-10-10 10:10:10', '🐈🐈🐈') | ||
; | ||
|
||
create table emojicode ( | ||
keyword serial primary key, | ||
emoji_code varchar(30) | ||
); | ||
insert into chat(userid, friendid, contents, create_at) values | ||
(123, 456, 'Hello', '2011-11-11 11:11:11'), | ||
(789, 123, 'Good morning', '2012-12-12 12:12:12'), | ||
(456, 789, 'Good afternoon', '2013-01-13 01:13:13'), | ||
(456, 123, 'Good evening', '2014-02-14 02:14:14'), | ||
(123, 789, 'Good night', '2015-03-15 03:15:15') | ||
|
||
; | ||
|
||
insert into requestfriend(userid, requestfriendid, create_at) values | ||
(12, 34, '2016-04-16 04:16:16'), | ||
(56, 78, '2017-05-17 05:17:17'), | ||
(91, 23, '2018-06-18 06:18:18'), | ||
(45, 67, '2019-07-19 07:19:19'), | ||
(89, 12, '2020-08-20 08:20:20') | ||
; | ||
insert into users(name, mail, filterlevel) values | ||
('ichigo.chocomint', '[email protected]', 1), | ||
('banana.chocomint', '[email protected]', 2), | ||
|