This commit is contained in:
2026-03-04 17:08:03 -08:00
parent 6e73012430
commit 69f68cc391
9 changed files with 136 additions and 6 deletions
@@ -0,0 +1,13 @@
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `sp_ProgressEvent_GetByGoalId`(IN p_id_goal CHAR(36))
BEGIN
SELECT
vc.`progressEventId`,
vc.`content`,
vc.`createdAt`,
vc.`createdByName`
FROM `v_progress_event_card` vc
WHERE vc.`goalId` = p_id_goal
ORDER BY vc.`createdAt` DESC;
END;;
DELIMITER ;
@@ -0,0 +1,5 @@
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `winstudentgoaltracker`.`v_progress_event_card` AS
select `pe`.`id_progress_event` AS `progressEventId`,`pe`.`id_goal` AS `goalId`,`g`.`id_student` AS `studentId`,`pe`.`content` AS `content`,`pe`.`created_at` AS `createdAt`,`u`.`name` AS `createdByName`
from ((`winstudentgoaltracker`.`progress_event` `pe`
join `winstudentgoaltracker`.`goal` `g` on((`g`.`id_goal` = `pe`.`id_goal`)))
left join `winstudentgoaltracker`.`user` `u` on((`u`.`id_user` = `pe`.`id_user_created`)));