1 | delete from "project".customer;
|
---|
2 |
|
---|
3 | delete from "project".package;
|
---|
4 |
|
---|
5 | delete from "project"."policy";
|
---|
6 |
|
---|
7 | delete from "project".pol_dog;
|
---|
8 |
|
---|
9 | delete from "project".auto_pol;
|
---|
10 |
|
---|
11 | delete from "project".travel_pol;
|
---|
12 |
|
---|
13 | delete from "project".pol_osi;
|
---|
14 |
|
---|
15 | delete from "project".vehicle;
|
---|
16 |
|
---|
17 | delete from "project".covers;
|
---|
18 |
|
---|
19 | delete from "project".payment;
|
---|
20 |
|
---|
21 | delete from "project".property_pol;
|
---|
22 |
|
---|
23 | delete from "project".property;
|
---|
24 |
|
---|
25 | -- type = 1 administrator, type=2 customer
|
---|
26 | insert into project.customer (c_id, name, email, "password", "type") values
|
---|
27 | (1, 'AdminUser', 'admin@newdomain.com', 'adminpass123', 0),
|
---|
28 | (2, 'John Doe', 'john.doe@example.com', 'password1234', 1),
|
---|
29 | (3, 'Jane Smith', 'jane.smith@example.com', 'mypassword5678', 1);
|
---|
30 |
|
---|
31 | insert into project.package (code, title, total, valuet) values
|
---|
32 | (1, 'Premium Package', 20000, 'USD'),
|
---|
33 | (2, 'Basic Package', 10000, 'USD'),
|
---|
34 | (3, 'Elite Package', 30000, 'USD'),
|
---|
35 | (4, 'Property', 1500,'usd')
|
---|
36 |
|
---|
37 | insert into project."policy" (p_id, sdate, edate, package) values
|
---|
38 | (1, '2023-11-01', '2024-11-01', 1),
|
---|
39 | (2, '2023-10-15', '2023-11-15', 2),
|
---|
40 | (3, '2023-12-01', '2024-01-01', 3),
|
---|
41 | (4, '2023-12-16', '2024-01-15', 4)
|
---|
42 |
|
---|
43 | insert into project.pol_dog (d_embg, c_id, "name", "policy", surname, birthdate, kontakt) values
|
---|
44 | (290700001, 2, 'John', 1, 'Doe', '1990-05-15', '072345678'),
|
---|
45 | (290700002, 3, 'Jane', 2, 'Smith', '1985-08-25', '073456789'),
|
---|
46 | (290700003, 2, 'John', 3, 'Doe', '1990-05-15', '072345678');
|
---|
47 |
|
---|
48 | insert into project.auto_pol (a_id, pol_id) values
|
---|
49 | (1, 1),
|
---|
50 | (2, 3);
|
---|
51 |
|
---|
52 | insert into project.travel_pol (tr_id, pol_id) values
|
---|
53 | (1, 2);
|
---|
54 |
|
---|
55 | insert into project.pol_osi (o_embg, "policy", "name", surname, birthdate, kontakt) values
|
---|
56 | (290700002, 1, 'Jane', 'Smith', '1985-08-25', '073456789');
|
---|
57 |
|
---|
58 | insert into project.vehicle (v_id, "policy", "type", marka, model, license_plate) values
|
---|
59 | (1, 1, 'car', 'Audi', 'A3', 'SK1234AB'),
|
---|
60 | (2, 2, 'bus', 'Mercedes', 'Sprinter', 'SK5678CD');
|
---|
61 |
|
---|
62 | insert into project.covers (cov_id, cov_amount, package, "cov_type") values
|
---|
63 | (1, 2000, 1, 'Medical Expenses Cover, Trip Cancellation/Interruption Due to Illness'),
|
---|
64 | (2, 3000, 2, 'Ambulance Services, Medical Expenses Cover, Trip Cancellation/Interruption Due to Illness'),
|
---|
65 | (3, 4000, 3, 'Personal Accident Insurance, Ambulance Services, Medical Expenses Cover, Trip Cancellation/Interruption Due to Illness'),
|
---|
66 | (4, 10000, 4, 'Earthquake, Storm, Wind, Flood')
|
---|
67 |
|
---|
68 |
|
---|
69 | insert into project.payment (payment_num, "policy", p_date, p_amount) values
|
---|
70 | (1, 1, '2024-05-15', 22000),
|
---|
71 | (2, 2, '2024-06-01', 18000),
|
---|
72 | (3, 3, '2024-07-10', 25000);
|
---|
73 |
|
---|
74 | insert into project.property_pol (pr_id, pol_id) values
|
---|
75 | (1, 3),
|
---|
76 | (2, 4);
|
---|
77 |
|
---|
78 |
|
---|
79 | insert into project.property (prop_id, "policy", "address", floor, year_build, security) values
|
---|
80 | (1, 2, 'Skopje, Center, Blvd', 3, '2015-03-12', 1)
|
---|
81 |
|
---|