mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 01:47:41 +00:00
latest
This commit is contained in:
@@ -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`)));
|
||||
Reference in New Issue
Block a user