2002-08-13 13:07:40 -04:00
|
|
|
drop table persons;
|
2002-08-16 12:45:24 -04:00
|
|
|
drop sequence persons_id_seq;
|
|
|
|
|
create table persons (
|
|
|
|
|
id serial not null primary key,
|
|
|
|
|
name varchar(255) not null,
|
2004-08-20 10:27:32 -04:00
|
|
|
surname varchar(255) not null,
|
|
|
|
|
password varchar(64)
|
2002-08-13 13:07:40 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
drop table institutes;
|
2002-08-16 12:45:24 -04:00
|
|
|
drop sequence institutes_id_seq;
|
|
|
|
|
create table institutes (
|
|
|
|
|
id serial not null primary key,
|
|
|
|
|
name varchar(255)
|
2002-08-13 13:07:40 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
drop table documents;
|
2002-08-16 12:45:24 -04: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-13 13:07:40 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
drop table authors_docs;
|
2002-08-16 12:45:24 -04:00
|
|
|
create table authors_docs (
|
|
|
|
|
pers_id int not null,
|
|
|
|
|
doc_id int not null,
|
|
|
|
|
primary key ( pers_id, doc_id )
|
2002-08-13 13:07:40 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
drop table phones;
|
2002-08-16 12:45:24 -04: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-13 13:07:40 -04:00
|
|
|
);
|
|
|
|
|
|
2007-04-11 21:02:01 -04:00
|
|
|
drop table certs;
|
|
|
|
|
drop sequence certs_id_seq;
|
|
|
|
|
CREATE TABLE certs (
|
|
|
|
|
id int not null primary key,
|
|
|
|
|
cert bytea not null,
|
|
|
|
|
pers_id int not null
|
|
|
|
|
);
|
|
|
|
|
|
2005-01-18 18:21:48 -05:00
|
|
|
drop table referrals;
|
|
|
|
|
drop sequence referrals_id_seq;
|
|
|
|
|
create table referrals (
|
|
|
|
|
id serial not null primary key,
|
2005-01-18 19:00:52 -05:00
|
|
|
name varchar(255) not null,
|
|
|
|
|
url varchar(255) not null
|
2005-01-18 18:21:48 -05:00
|
|
|
);
|
|
|
|
|
|