-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdb_setup.txt
More file actions
54 lines (50 loc) · 827 Bytes
/
db_setup.txt
File metadata and controls
54 lines (50 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CREATE TABLE trip_table (
trip_id int PRIMARY KEY,
driver_id int,
departure_date date,
departure_time time,
departure_location text,
durations numeric[],
destinations text[],
seats_available int,
passenger_id int[],
prices numeric[],
vehicle_type text
);
INSERT INTO trip_table VALUES (
0,
0,
'October 8, 2018',
'12:30',
'McGill',
'{0.50}',
'{"Concordia", "UQAM"}',
3,
'{0}',
'{3.25,5.20}',
'SUBARU WRX STi Blue Sedan'
);
CREATE TABLE user_table (
userid int primary key,
admin boolean,
firstname text,
lastname text,
email text,
phone text,
password text,
preferences text,
driver_rating numeric,
passenger_rating numeric
);
insert into user_table values (
1,
1,
'John',
'Smith',
'JohnSmith@example.com',
'5140000000',
'mypassword',
'',
0,
0
);