-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
21 lines (17 loc) · 992 Bytes
/
init.sql
File metadata and controls
21 lines (17 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Insert sample departments
INSERT INTO departments (name, code) VALUES
('Computer Science', 'CS'),
('Mathematics', 'MATH'),
('Physics', 'PHY');
-- Insert a teacher user (password: teacher123)
INSERT INTO users (username, password, email, role) VALUES
('teacher1', '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iKTVKIiW', 'teacher1@school.edu', 'TEACHER');
-- Insert the teacher record
INSERT INTO teachers (user_id, department_id, employee_id) VALUES
(1, 1, 'T001');
-- Insert a student user (password: student123)
INSERT INTO users (username, password, email, role) VALUES
('student1', '$2a$10$N.zmdr9k7uOCQb376NoUnuTJ8iAt6Z5EHsM8lE9lBOsl7iKTVKIiW', 'student1@school.edu', 'STUDENT');
-- Insert the student record
INSERT INTO students (user_id, department_id, student_id, phone, address) VALUES
(2, 1, 'S001', '1234567890', '123 Main St');