aboutsummaryrefslogtreecommitdiff
path: root/revert/update_timestamp@v1.0.0-alpha.3.sql
blob: 30f9c6daed9140e0ce7df128c58a05fd50ae1cb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Deploy kakeibo:update_timestamp to pg
-- requires: schema

BEGIN;

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

COMMIT;