1 |
dpavlin |
1.1 |
|
2 |
|
|
/* delete all objects before creating them, so this script can be re-run |
3 |
|
|
when changes are made to the schema. */ |
4 |
|
|
|
5 |
|
|
drop sequence contactseq; |
6 |
|
|
CREATE SEQUENCE contactseq start 1 ; |
7 |
|
|
|
8 |
|
|
drop sequence photoseq; |
9 |
|
|
CREATE SEQUENCE photoseq start 1 ; |
10 |
|
|
|
11 |
|
|
drop table contact; |
12 |
|
|
create table contact ( |
13 |
|
|
id int default nextval( 'contactseq' ) not null, |
14 |
|
|
firstname varchar(50), |
15 |
|
|
lastname varchar(50), |
16 |
|
|
phone char(10), |
17 |
|
|
email varchar(50), |
18 |
|
|
typeid char(1), |
19 |
|
|
photo varchar(20), |
20 |
|
|
origphoto varchar(20), |
21 |
|
|
notes text, |
22 |
|
|
testid int, |
23 |
|
|
primary key( id ) |
24 |
|
|
); |