forked from gexiangdong/tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsql.sql
36 lines (28 loc) · 957 Bytes
/
sql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
create database main_db;
create table customer(
id serial primary key,
dataSourceClassName varchar(100),
dataSourceUser varchar(50),
dataSourcePassword varchar(50),
dataSourceDataBaseName varchar(50),
dataSourcePortNumber int,
dataSourceServerName varchar(50)
);
insert into customer(dataSourceClassName, dataSourceUser, dataSourcePassword, dataSourceDataBaseName, dataSourcePortNumber, dataSourceServerName)
values('org.postgresql.ds.PGSimpleDataSource', 'pgdbo', '', 'tvseries', 5432, '127.0.0.1');
create database tvseries;
/** TABLES **/
create table tv_series(
id serial primary key,
name varchar(50) not null,
season_count int not null,
origin_release date not null,
status smallint not null default 0,
delete_reason varchar(100) null
);
create table tv_character(
id serial primary key,
tv_series_id int not null,
name varchar(50) not null,
photo varchar(100) null
);