diff --git a/rattail_corepos/corepos/office/triggers.py b/rattail_corepos/corepos/office/triggers.py index b06be04..e0b16cf 100644 --- a/rattail_corepos/corepos/office/triggers.py +++ b/rattail_corepos/corepos/office/triggers.py @@ -222,7 +222,7 @@ class CoreTriggerHandler(GenericHandler): op_session.execute(sa.text(f""" CREATE TRIGGER record_meminfo_delete 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): @@ -242,7 +242,7 @@ class CoreTriggerHandler(GenericHandler): op_session.execute(sa.text(f""" CREATE TRIGGER record_employees_delete 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):