2002-08-14 01:07:40 +08:00
|
|
|
drop table persons;
|
2002-08-17 00:45:24 +08:00
|
|
|
drop sequence persons_id_seq;
|
|
|
|
create table persons (
|
|
|
|
id serial not null primary key,
|
|
|
|
name varchar(255) not null,
|
2004-08-20 22:27:32 +08:00
|
|
|
surname varchar(255) not null,
|
|
|
|
password varchar(64)
|
2002-08-14 01:07:40 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
drop table institutes;
|
2002-08-17 00:45:24 +08:00
|
|
|
drop sequence institutes_id_seq;
|
|
|
|
create table institutes (
|
|
|
|
id serial not null primary key,
|
|
|
|
name varchar(255)
|
2002-08-14 01:07:40 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
drop table documents;
|
2002-08-17 00:45:24 +08:00
|
|
|
drop sequence documents_id_seq;
|
|
|
|
create table documents (
|
|
|
|
id serial not null primary key,
|
|
|
|
title varchar(255) not null,
|
|
|
|
abstract varchar(255)
|
2002-08-14 01:07:40 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
drop table authors_docs;
|
2002-08-17 00:45:24 +08:00
|
|
|
create table authors_docs (
|
|
|
|
pers_id int not null,
|
|
|
|
doc_id int not null,
|
|
|
|
primary key ( pers_id, doc_id )
|
2002-08-14 01:07:40 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
drop table phones;
|
2002-08-17 00:45:24 +08:00
|
|
|
drop sequence phones_id_seq;
|
|
|
|
create table phones (
|
|
|
|
id serial not null primary key,
|
|
|
|
phone varchar(255) not null ,
|
|
|
|
pers_id int not null
|
2002-08-14 01:07:40 +08:00
|
|
|
);
|
|
|
|
|
2005-01-19 07:21:48 +08:00
|
|
|
drop table referrals;
|
|
|
|
drop sequence referrals_id_seq;
|
|
|
|
create table referrals (
|
|
|
|
id serial not null primary key,
|
2005-01-19 08:00:52 +08:00
|
|
|
name varchar(255) not null,
|
|
|
|
url varchar(255) not null
|
2005-01-19 07:21:48 +08:00
|
|
|
);
|
|
|
|
|