You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE ALGORITHM = MERGE SQL SECURITY DEFINER VIEW `changes_ext`ASselect`c`.`code`AS`code`,`p`.`name`AS`name`,`p`.`start`AS`start`,`c`.`new_code`AS`new_code`,`s`.`name`AS`new_name`,`s`.`start`AS`new_start`,`c`.`time`AS`time`,`c`.`desc_id`AS`desc_id`from ((`changes``c`join`codes``p`on(((`p`.`code`=`c`.`code`) and ((`c`.`time`-1) >=`p`.`start`) and ((`p`.`end` is null) or ((`c`.`time`-1) <`p`.`end`))))) join`codes``s`on(((`s`.`code`=`c`.`new_code`) and (`c`.`time`>=`s`.`start`) and ((`s`.`end` is null) or (`c`.`time`<`s`.`end`)))));
44
+
CREATE ALGORITHM = MERGE SQL SECURITY DEFINER VIEW `changes_ext`ASselect`c`.`code`AS`code`,`a`.`name`AS`name`,`a`.`start`AS`start`,`c`.`new_code`AS`new_code`,`b`.`name`AS`new_name`,`b`.`start`AS`new_start`,`c`.`time`AS`time`,`c`.`desc_id`AS`desc_id`,`d`.`text`AS`desc_text`from (((`changes``c`join`codes``a`on(((`a`.`code`=`c`.`code`) and (`a`.`start`<`c`.`time`) and ((`a`.`end` is null) or (`a`.`end`>=`c`.`time`))))) join`codes``b`on(((`b`.`code`=`c`.`new_code`) and (`b`.`start`<=`c`.`time`) and ((`b`.`end` is null) or (`b`.`end`>`c`.`time`)))))left join`descriptions``d`on((`d`.`id`=`c`.`desc_id`))) order by`c`.`time`desc,`c`.`code`,`c`.`new_code`;
0 commit comments