Debian Codegraph @

servers/slapd/back-sql/rdbms_depend/pgsql/testdb_create.sql

raw
1 drop table persons;
2 drop sequence persons_id_seq;
3 create table persons (
4 id serial not null primary key,
5 name varchar(255) not null,
6 surname varchar(255) not null,
7 password varchar(64)
8 );
9
10 drop table institutes;
11 drop sequence institutes_id_seq;
12 create table institutes (
13 id serial not null primary key,
14 name varchar(255)
15 );
16
17 drop table documents;
18 drop sequence documents_id_seq;
19 create table documents (
20 id serial not null primary key,
21 title varchar(255) not null,
22 abstract varchar(255)
23 );
24
25 drop table authors_docs;
26 create table authors_docs (
27 pers_id int not null,
28 doc_id int not null,
29 primary key ( pers_id, doc_id )
30 );
31
32 drop table phones;
33 drop sequence phones_id_seq;
34 create table phones (
35 id serial not null primary key,
36 phone varchar(255) not null ,
37 pers_id int not null
38 );
39
40 drop table certs;
41 drop sequence certs_id_seq;
42 CREATE TABLE certs (
43 id int not null primary key,
44 cert bytea not null,
45 pers_id int not null
46 );
47
48 drop table referrals;
49 drop sequence referrals_id_seq;
50 create table referrals (
51 id serial not null primary key,
52 name varchar(255) not null,
53 url varchar(255) not null
54 );
55