OSDN Git Service

bootstrap.phpとAppModel.phpを出力に加えた。
[exmascake/exmascake.git] / create_tables.sql
1 drop table projects;
2
3 create table projects (
4     id serial not null,
5     name varchar(100) not null,
6     status int default 0,
7     description text,
8     created timestamp,
9     modified timestamp,
10 primary key (id)
11 );
12
13 drop table dbs;
14
15 create table dbs (
16     id serial not null,
17     db_name varchar(30) not null,
18     db_host varchar(30) not null,
19     db_port int ,
20     db_user varchar(30) not null,
21     db_password varchar(40) ,
22     created timestamp,
23     modified timestamp,
24 primary key(id)
25 );
26
27 drop table db_tables;
28
29 create table db_tables (
30     id serial not null,
31     name varchar(50) not null,
32     symbol varchar(30) not null,
33     db_id int not null,
34     description text,
35     created timestamp,
36     modified timestamp,
37 primary key(id)
38 );
39
40 drop table table_fields;
41
42 create table table_fields (
43     id serial not null,
44     line_no int not null,
45     name varchar(50) not null ,
46     symbol varchar(30) not null ,
47     field_type varchar(20) not null,
48     field_option varchar(30) ,
49     default_value varchar(30),
50     db_table_id int not null,
51     foreign_table varchar(30),
52     foreign_field varchar(30),
53     description text,
54     created timestamp,
55     modified timestamp,
56 primary key(id)
57 );
58