-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
78 lines (65 loc) · 1.75 KB
/
schema.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
-- Tables and Data surrounding a user
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS service_info;
DROP TABLE IF EXISTS employee_info;
DROP TABLE IF EXISTS employer_info;
DROP TABLE IF EXISTS messages;
DROP TABLE IF EXISTS community_service_events;
DROP TABLE IF EXISTS jobs;
-- CREATE TABLE employee_info (
-- employee_id INTEGER PRIMARY KEY AUTOINCREMENT,
-- status TEXT NOT NULL
-- );
-- CREATE TABLE employer_info (
-- employer_id INTEGER PRIMARY KEY AUTOINCREMENT,
-- company TEXT NOT NULL,
-- email TEXT,
-- phone_number TEXT
-- );
-- CREATE TABLE service_info (
-- service_id INTEGER PRIMARY KEY AUTOINCREMENT,
-- branch TEXT NOT NULL,
-- years INTEGER
-- );
CREATE TABLE users (
user_id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
firstName TEXT,
lastName TEXT,
email TEXT,
isEmployer INTEGER
);
-- Tables for the Chat system
CREATE TABLE messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT,
sent TEXT NOT NULL,
message TEXT NOT NULL,
channel_id INTEGER NOT NULL,
sender TEXT NOT NULL,
sender_color TEXT NOT NULL
);
-- Tables for the Community Service section
CREATE TABLE community_service_events (
event_id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
date TEXT NOT NULL,
time TEXT,
street_address TEXT,
city TEXT,
state TEXT,
zipcode INTEGER
);
-- Tables for the Employment section
CREATE TABLE jobs (
job_id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
description TEXT NOT NULL,
industry TEXT,
time_posted TEXT,
due_date TEXT,
street_address TEXT NOT NULL,
city TEXT NOT NULL,
state TEXT NOT NULL,
zipcode INTEGER NOT NULL
);