forked from stevensblueprint/backend_challenge_spring_2024
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sql
19 lines (18 loc) · 1.18 KB
/
init.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CREATE TABLE IF NOT EXISTS volunteers (
volunteer_id UUID PRIMARY KEY,
first_name VARCHAR(100) NOT NULL,
last_name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
phone_number VARCHAR(20),
date_of_birth DATE,
address VARCHAR(255),
skills TEXT[],
availability JSON,
date_joined DATE NOT NULL DEFAULT CURRENT_DATE,
background_check BOOLEAN DEFAULT FALSE
);
INSERT INTO volunteers (volunteer_id, first_name, last_name, email, phone_number, date_of_birth, address, skills, availability, background_check)
VALUES
('123e4567-e89b-12d3-a456-426614174000', 'John', 'Doe', '[email protected]', '+1234567890', '1990-01-01', '123 Main St, Anytown, AS', '{"First Aid", "Counseling"}', '{"Monday": ["AM"], "Saturday": ["PM"]}', TRUE),
('223e4567-e89b-12d3-a456-426614174001', 'Jane', 'Smith', '[email protected]', '+1987654321', '1985-05-10', '456 Elm St, Othertown, BS', '{"CPR", "Teaching"}', '{"Wednesday": ["AM"], "Sunday": ["PM"]}', TRUE),
('323e4567-e89b-12d3-a456-426614174002', 'Michael', 'Johnson', '[email protected]', '+1987654331', '1992-11-15', '789 Oak St, Newcity, CS', '{"Driving", "Organizing"}', '{"Friday": ["PM"]}', FALSE);