fix: fix DELETE triggers for meminfo
, employees
whoops not sure how those got missed
This commit is contained in:
parent
6cece2c41e
commit
339c718b32
|
@ -222,7 +222,7 @@ class CoreTriggerHandler(GenericHandler):
|
||||||
op_session.execute(sa.text(f"""
|
op_session.execute(sa.text(f"""
|
||||||
CREATE TRIGGER record_meminfo_delete
|
CREATE TRIGGER record_meminfo_delete
|
||||||
AFTER DELETE ON meminfo
|
AFTER DELETE ON meminfo
|
||||||
FOR EACH ROW INSERT INTO {changes_table} (object_type, object_key, deleted) VALUES ('Member', CONVERT(OLD.card_no, CHAR));
|
FOR EACH ROW INSERT INTO {changes_table} (object_type, object_key, deleted) VALUES ('Member', CONVERT(OLD.card_no, CHAR), 1);
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
def create_triggers_employees(self, op_session, changes_table):
|
def create_triggers_employees(self, op_session, changes_table):
|
||||||
|
@ -242,7 +242,7 @@ class CoreTriggerHandler(GenericHandler):
|
||||||
op_session.execute(sa.text(f"""
|
op_session.execute(sa.text(f"""
|
||||||
CREATE TRIGGER record_employees_delete
|
CREATE TRIGGER record_employees_delete
|
||||||
AFTER DELETE ON employees
|
AFTER DELETE ON employees
|
||||||
FOR EACH ROW INSERT INTO {changes_table} (object_type, object_key, deleted) VALUES ('Employee', CONVERT(OLD.emp_no, CHAR));
|
FOR EACH ROW INSERT INTO {changes_table} (object_type, object_key, deleted) VALUES ('Employee', CONVERT(OLD.emp_no, CHAR), 1);
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
def create_triggers_departments(self, op_session, changes_table):
|
def create_triggers_departments(self, op_session, changes_table):
|
||||||
|
|
Loading…
Reference in a new issue