-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.sql
More file actions
36 lines (33 loc) · 735 Bytes
/
table.sql
File metadata and controls
36 lines (33 loc) · 735 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
-- create user table
CREATE TABLE IF NOT EXISTS users (
id SERIAL PRIMARY KEY,
name varchar (255),
email varchar (255),
password varchar (255),
gender varchar (255),
age numeric,
occupation varchar (255),
salary varchar (255)
);
-- create budget table
CREATE TABLE IF NOT EXISTS budget (
id SERIAL PRIMARY KEY,
users_id numeric,
category varchar (255),
budget numeric
);
-- create expense table
CREATE TABLE IF NOT EXISTS expense (
id SERIAL PRIMARY KEY,
users_id numeric,
date varchar (255),
category varchar (255),
spent numeric,
remark varchar (255)
);
-- create friendship table
CREATE TABLE IF NOT EXISTS friendship (
id SERIAL PRIMARY KEY,
users_id numeric,
friend_users_id numeric
);