1 |
|
---|
2 | set search_path = "project";
|
---|
3 |
|
---|
4 |
|
---|
5 | delete from "project".customer;
|
---|
6 |
|
---|
7 | delete from "project".package;
|
---|
8 | delete from "project"."policy";
|
---|
9 | delete from "project".pol_dog;
|
---|
10 | delete from "project".pol_auto;
|
---|
11 | delete from "project".pol_travel;
|
---|
12 | delete from "project".pol_osi;
|
---|
13 | delete from "project".vehicle;
|
---|
14 |
|
---|
15 |
|
---|
16 | -- type = 1 administrator, type=2 customer
|
---|
17 | insert into project.customer (c_id, name,email,"password","type") values
|
---|
18 | (1,'Administrator', 'a@trustshield.com', 'aa321','0'),
|
---|
19 | (2,'Ardit', 'ardit@gmail.com', 'aaa2456','1'),
|
---|
20 | (3,'Dragana', 'dragana@hotmail.com', 'sss8989','1');
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | insert into project.package (code, title, covers, total, valuet) values
|
---|
25 | (1, 'Package Gold', 'Hospital', 15000, 'Den'),
|
---|
26 | (2, 'Package Gold1', 'Zdravstveno', 18000, 'Den'),
|
---|
27 | (3, 'Package Gold2', '100%', 25000, 'Den');
|
---|
28 |
|
---|
29 |
|
---|
30 | insert into project."policy" (p_id,sdate,edate,package) values
|
---|
31 | (1, '20231221','20241220',1),
|
---|
32 | (2, '20231212','20231220',2),
|
---|
33 | (3, '20231205','20231210',3);
|
---|
34 |
|
---|
35 |
|
---|
36 |
|
---|
37 | insert into project.pol_dog (d_embg,c_id,"name","policy",surname,birthdate,kontakt) values
|
---|
38 | (290699945,2,'Ardit',1,'Ameti','19990629','070926854'),
|
---|
39 | (290699900,3,'Dragana',2,'Stojanovic','20000105','070852654'),
|
---|
40 | (290699942,2,'Ardit',3,'Ameti','19990629','070926854');
|
---|
41 |
|
---|
42 |
|
---|
43 | insert into project.pol_auto (a_id,pol_id) values
|
---|
44 | (1,1),
|
---|
45 | (2,3);
|
---|
46 |
|
---|
47 |
|
---|
48 | insert into project.pol_travel (tr_id, pol_id) values
|
---|
49 | (1,2);
|
---|
50 |
|
---|
51 |
|
---|
52 | insert into project.pol_osi (o_embg ,"policy","name",surname,birthdate,kontakt) values
|
---|
53 | (290699900,1,'Dragana','Stojanovic','20000105','070852654');
|
---|
54 |
|
---|
55 | insert into project.vehicle (v_id,"policy","type",marka,model,license_plate) values
|
---|
56 | (1,1,'avto','BMW','x1','sk0869bc'),
|
---|
57 | (2,2,'bus','volvo','tmpx2','sk7469ap');
|
---|
58 |
|
---|