1 -- This file should undo anything in `up.sql`
2 create or replace function was_removed_or_deleted(TG_OP text, OLD record, NEW record)
7 IF (TG_OP = 'INSERT') THEN
11 IF (TG_OP = 'DELETE') THEN
15 return TG_OP = 'UPDATE' AND (
16 (OLD.deleted = 'f' AND NEW.deleted = 't') OR
17 (OLD.removed = 'f' AND NEW.removed = 't')