I am using Spring Boot Database initialization using Spring JDBC with schema.sql file.I am using MYSQL
If I have simple table creation in schema.sql as follows it wo
My issue was resolved when I have added spring.datasource.separator=^; in application.properties and every line out side the procedure/trigger should be terminated with ^;
Example as follows:
DROP TRIGGER IF EXISTS Persons_log_update ^;
CREATE TRIGGER Persons_log_update
BEFORE UPDATE ON Persons
FOR EACH ROW
BEGIN
INSERT INTO Personshistory(PersonID,LastName,FirstName,Address,City)
values(OLD.PersonID,OLD.LastName,OLD.FirstName,OLD.Address,OLD.City);
END ^;