-- Deploy photos:update_timestamp to pg
-- requires: schema

BEGIN;

SET search_path to photos;

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

COMMIT;
