mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 09:57:37 +00:00
Latest
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
CREATE TABLE `refresh_token` (
|
||||
`id_refresh_token` char(36) NOT NULL,
|
||||
`id_user` char(36) NOT NULL,
|
||||
`id_program` char(36) DEFAULT NULL,
|
||||
`token_hash` varchar(512) NOT NULL,
|
||||
`token_salt` varchar(512) NOT NULL,
|
||||
`expires_at` timestamp NOT NULL,
|
||||
@@ -15,6 +16,8 @@ CREATE TABLE `refresh_token` (
|
||||
KEY `idx_refresh_token_user` (`id_user`),
|
||||
KEY `idx_refresh_token_expires` (`expires_at`),
|
||||
KEY `refresh_token_ibfk_2` (`replaced_by_token_id`),
|
||||
KEY `fk_refresh_token_program` (`id_program`),
|
||||
CONSTRAINT `fk_refresh_token_program` FOREIGN KEY (`id_program`) REFERENCES `program` (`id_program`),
|
||||
CONSTRAINT `refresh_token_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`),
|
||||
CONSTRAINT `refresh_token_ibfk_2` FOREIGN KEY (`replaced_by_token_id`) REFERENCES `refresh_token` (`id_refresh_token`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
CREATE TABLE `student` (
|
||||
`id_student` char(36) NOT NULL,
|
||||
`id_program` char(36) DEFAULT NULL,
|
||||
`id_user` char(36) DEFAULT NULL,
|
||||
`identifier` varchar(50) DEFAULT NULL,
|
||||
`program_year` int DEFAULT NULL,
|
||||
`enrollment_date` date DEFAULT NULL,
|
||||
@@ -8,5 +9,7 @@ CREATE TABLE `student` (
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id_student`),
|
||||
KEY `student_ibfk_1` (`id_program`),
|
||||
CONSTRAINT `student_ibfk_1` FOREIGN KEY (`id_program`) REFERENCES `program` (`id_program`)
|
||||
KEY `student_ibfk_2` (`id_user`),
|
||||
CONSTRAINT `student_ibfk_1` FOREIGN KEY (`id_program`) REFERENCES `program` (`id_program`),
|
||||
CONSTRAINT `student_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `user` (`id_user`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
@@ -2,7 +2,6 @@ CREATE TABLE `user_student` (
|
||||
`id_user_student` char(36) NOT NULL,
|
||||
`id_user` char(36) DEFAULT NULL,
|
||||
`id_student` char(36) DEFAULT NULL,
|
||||
`access_level` varchar(50) DEFAULT NULL,
|
||||
`is_primary` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`id_user_student`),
|
||||
KEY `user_student_ibfk_1` (`id_user`),
|
||||
|
||||
Reference in New Issue
Block a user