Skip to content

Commit

Permalink
merged develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nawta committed Aug 24, 2020
2 parents dd98e65 + aee0b17 commit 4fa65bb
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 17 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
./target/*
target/
*.iml
.idea/
demo.iml
*.class
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: '3'

services:
db:
image: postgres:latest
container_name: emolog_db
volumes:
- ./docker/pg:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- '5432:5432'
db:
image: postgres:latest
container_name: emolog_db
volumes:
- ./docker/pg:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- '5432:5432'
49 changes: 45 additions & 4 deletions docker/pg/1-createTable.sql
Original file line number Diff line number Diff line change
@@ -1,16 +1,57 @@
create table users (
id serial primary key,
name varchar not null,
age integer not null
name varchar(30) not null,
mail varchar(50) not null,
filterlevel smallint
);

create table friend (
id serial primary key,
userid INTEGER not null,
friendid INTEGER not null,
name varchar(30) not null,
latestemolog varchar(30)
);

create table emolog (
id serial primary key,
userid INTEGER not null,
friendid INTEGER not null,
create_at timestamp,
contents varchar(30)
);

create table talk (
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,
contents varchar(30)
create_at timestamp,
);

create table emojicode (
keyword serial primary key,
emoji_code
emoji_code
);


insert into users(name, mail, filterlevel) values
('ichigo.chocomint', '[email protected]', 1),
('banana.chocomint', '[email protected]', 2),
('pinapple.chocomint', '[email protected]', 3)
;


insert into users(name, age) values
('ichigo.chocomint', 99),
('banana.chocomint', 98),
('pinapple.chocomint', 97)
;
;
2 changes: 1 addition & 1 deletion src/main/java/com/example/demo/DemoApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DemoApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}

q
@Autowired
JdbcTemplate jdbcTemplate;

Expand Down

0 comments on commit 4fa65bb

Please sign in to comment.