diff --git a/gears/create_databaase/2.init_database.sql b/gears/create_databaase/2.init_database.sql index ffd3d66fc13ac30ed7828c5fd5b0bbbc00795464..e00d7ef8d7addd745c47594997ae297ac9203cd1 100644 --- a/gears/create_databaase/2.init_database.sql +++ b/gears/create_databaase/2.init_database.sql @@ -318,7 +318,7 @@ UNLOCK TABLES; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`mars`@`%`*/ /*!50003 TRIGGER `in_orders` AFTER INSERT ON `orders` FOR EACH ROW insert into orders_log(id, item_id, amount, unit_price, total, description, ts, direction) +/*!50003 CREATE*/ /*!50003 TRIGGER `in_orders` AFTER INSERT ON `orders` FOR EACH ROW insert into orders_log(id, item_id, amount, unit_price, total, description, ts, direction) values(NEW.id, NEW.item_id, NEW.amount, NEW.unit_price, NEW.total, NEW.description, NEW.ts, 'in') */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -334,7 +334,7 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`mars`@`%`*/ /*!50003 TRIGGER `out_orders` AFTER DELETE ON `orders` FOR EACH ROW insert into orders_log(id, item_id, amount, unit_price, total, description, ts, direction) +/*!50003 CREATE*/ /*!50003 TRIGGER `out_orders` AFTER DELETE ON `orders` FOR EACH ROW insert into orders_log(id, item_id, amount, unit_price, total, description, ts, direction) values(OLD.id, OLD.item_id, OLD.amount, OLD.unit_price, OLD.total, OLD.description, OLD.ts, 'out') */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -511,7 +511,6 @@ USE `studio`; /*!50001 SET character_set_results = utf8mb4 */; /*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ -/*!50013 DEFINER=`mars`@`%` SQL SECURITY DEFINER */ /*!50001 VIEW `v_addresses` AS select `employee`.`name` AS `name`,`employee`.`address` AS `address` from `employee` union select `customer`.`name` AS `name`,`customer`.`address` AS `address` from `customer` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */;