def drop_constr_trigger(self, table_name, constraint): cname = constraint.raw_constraint_name() ins_trigger_name = common.edgedb_name_to_pg_name(cname + '_instrigger') ins_trigger = dbops.Trigger( name=ins_trigger_name, table_name=table_name, events=('insert', ), procedure='null', is_constraint=True, inherit=True) drop_ins_trigger = dbops.DropTrigger(ins_trigger) upd_trigger_name = common.edgedb_name_to_pg_name(cname + '_updtrigger') upd_trigger = dbops.Trigger( name=upd_trigger_name, table_name=table_name, events=('update', ), procedure='null', is_constraint=True, inherit=True) drop_upd_trigger = dbops.DropTrigger(upd_trigger) return [drop_ins_trigger, drop_upd_trigger]
def drop_constr_trigger(self, table_name, constraint): ins_trigger, upd_trigger = self._get_triggers(table_name, constraint) return [ dbops.DropTrigger(ins_trigger), dbops.DropTrigger(upd_trigger) ]