-- Deploy diary:update_updated_at to pg
-- requires: schema

BEGIN;

SET search_path to diary;

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

COMMIT;
