
--
-- trigger for insert to job for change log
--
DROP TRIGGER job_log_insert_trigger on job;
CREATE TRIGGER job_log_insert_trigger
AFTER INSERT
ON job FOR EACH ROW
EXECUTE PROCEDURE log_insert('job');

--
-- trigger for update to job for change log
--
DROP TRIGGER job_log_update_trigger on job;
CREATE TRIGGER job_log_update_trigger
AFTER DELETE
ON job FOR EACH ROW
EXECUTE PROCEDURE log_update('job');

----

--
-- trigger for insert to employee for change log
--
DROP TRIGGER employee_log_insert_trigger on employee;
CREATE TRIGGER employee_log_insert_trigger
AFTER INSERT
ON employee FOR EACH ROW
EXECUTE PROCEDURE log_insert('employee');

--
-- trigger for update to employee for change log
--
DROP TRIGGER employee_log_update_trigger on employee;
CREATE TRIGGER employee_log_update_trigger
AFTER UPDATE
ON employee FOR EACH ROW
EXECUTE PROCEDURE log_update('employee');

----

--
-- trigger for insert to education for change log
--
DROP TRIGGER education_log_insert_trigger on education;
CREATE TRIGGER education_log_insert_trigger
AFTER INSERT
ON education FOR EACH ROW
EXECUTE PROCEDURE log_insert('education');

--
-- trigger for update to education for change log
--
DROP TRIGGER education_log_update_trigger on education;
CREATE TRIGGER education_log_update_trigger
AFTER UPDATE
ON education FOR EACH ROW
EXECUTE PROCEDURE log_update('education');

----

--
-- trigger for insert to training for change log
--
DROP TRIGGER training_log_insert_trigger on training;
CREATE TRIGGER training_log_insert_trigger
AFTER INSERT
ON training FOR EACH ROW
EXECUTE PROCEDURE log_insert('training');

--
-- trigger for update to training for change log
--
DROP TRIGGER training_log_update_trigger on training;
CREATE TRIGGER training_log_update_trigger
AFTER UPDATE
ON training FOR EACH ROW
EXECUTE PROCEDURE log_update('training');

----

--
-- trigger for insert to certification for change log
--
DROP TRIGGER certification_log_insert_trigger on certification;
CREATE TRIGGER certification_log_insert_trigger
AFTER INSERT
ON certification FOR EACH ROW
EXECUTE PROCEDURE log_insert('certification');

--
-- trigger for update to certification for change log
--
DROP TRIGGER certification_log_update_trigger on certification;
CREATE TRIGGER certification_log_update_trigger
AFTER UPDATE
ON certification FOR EACH ROW
EXECUTE PROCEDURE log_update('certification');

----

--
-- trigger for insert to requirementswaiver for change log
--
DROP TRIGGER requirementswaiver_log_insert_trigger on requirementswaiver;
CREATE TRIGGER requirementswaiver_log_insert_trigger
AFTER INSERT
ON requirementswaiver FOR EACH ROW
EXECUTE PROCEDURE log_insert('requirementswaiver');

--
-- trigger for update to requirementswaiver for change log
--
DROP TRIGGER requirementswaiver_log_update_trigger on requirementswaiver;
CREATE TRIGGER requirementswaiver_log_update_trigger
AFTER UPDATE
ON requirementswaiver FOR EACH ROW
EXECUTE PROCEDURE log_update('requirementswaiver');

----

--
-- trigger for insert to cowarrant for change log
--
DROP TRIGGER cowarrant_log_insert_trigger on cowarrant;
CREATE TRIGGER cowarrant_log_insert_trigger
AFTER INSERT
ON cowarrant FOR EACH ROW
EXECUTE PROCEDURE log_insert('cowarrant');

--
-- trigger for update to cowarrant for change log
--
DROP TRIGGER cowarrant_log_update_trigger on cowarrant;
CREATE TRIGGER cowarrant_log_update_trigger
AFTER UPDATE
ON cowarrant FOR EACH ROW
EXECUTE PROCEDURE log_update('cowarrant');

----

