-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtables.sql
59 lines (53 loc) · 1.08 KB
/
tables.sql
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
55
56
57
58
59
-- Connect to a database or create a new one
sqlite3 mydatabase.db
-- Create a table called "Ride"
CREATE TABLE Ride (
driver_id TEXT,
name TEXT,
image TEXT,
event_time TEXT,
distance REAL,
ride_id TEXT PRIMARY KEY,
location TEXT,
seats INTEGER,
to_uni INTEGER,
price REAL,
description TEXT,
request_status TEXT
);
-- Create a table called "Profile"
CREATE TABLE Profile (
profile_id TEXT PRIMARY KEY,
score INTEGER,
name TEXT,
interests TEXT,
education TEXT,
city TEXT,
bio TEXT,
gender TEXT,
image TEXT
);
-- Create a table called "Notification"
CREATE TABLE Notification (
message TEXT,
ride_id TEXT
);
-- Create a table called "Pickup"
CREATE TABLE Pickup (
profile_id TEXT,
status TEXT,
ride_id TEXT,
name TEXT,
image TEXT
);
-- Create a table called "Review"
CREATE TABLE Review (
score INTEGER,
ride_id TEXT,
profile_id TEXT
);
-- Create a table called "reviews" (assuming it's a separate table from "Review")
CREATE TABLE reviews (
score INTEGER,
ride_id TEXT
);