-- Deploy kakeibo:update_timestamp to pg
-- requires: appschema

BEGIN;

CREATE OR REPLACE FUNCTION kakeibo.update_timestamp()
  RETURNS TRIGGER AS $$
BEGIN
  NEW.updated_at = NOW();
  RETURN NEW;
END;
$$ LANGUAGE plpgsql;

COMMIT;
