Update: Few issues to resolve see readme

this push will conclude the majority of pulls. this repos will now, not be actively be managed or any further code pushes will not be frequent.
This commit is contained in:
Mann Patel
2025-09-11 16:54:30 -06:00
parent 144436bbf3
commit b21e76eed0
19 changed files with 1953 additions and 1442 deletions

View File

@@ -13,12 +13,7 @@ CREATE TABLE users (
first_name VARCHAR(100),
last_name VARCHAR(100),
email VARCHAR(150) UNIQUE NOT NULL,
phone VARCHAR(20),
password TEXT NOT NULL,
role_id INT REFERENCES role(role_id) ON DELETE SET NULL,
admin_code CHAR(6) UNIQUE,
-- Admin settings combined here
ward_settings TEXT,
phone VARCHAR(20) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
@@ -100,7 +95,7 @@ CREATE TABLE post (
);
CREATE TABLE availability (
availability_id SERIAL PRIMARY KEY,
sched_id SERIAL PRIMARY KEY,
user_id INT REFERENCES users(user_id) ON DELETE CASCADE,
day_of_week VARCHAR(20),
start_time TIME,
@@ -139,3 +134,6 @@ INSERT INTO role (role_id, name) VALUES
(2, 'team_lead'),
(3, 'volunteer')
ON CONFLICT DO NOTHING;
ALTER TABLE availability
ADD CONSTRAINT availability_user_day_unique UNIQUE (user_id, day_of_week);