aboutsummaryrefslogtreecommitdiff
path: root/deploy/articles_update_updated_at.sql
blob: 31b7ccdeb157f3af2ff35c7048adf0640c2df77f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- Deploy diary:articles_update_updated_at to pg
-- requires: schema
-- requires: articles
-- requires: update_updated_at

BEGIN;

SET search_path to diary;

CREATE OR REPLACE TRIGGER update_updated_at
  BEFORE UPDATE ON articles
  FOR EACH ROW
  EXECUTE FUNCTION update_updated_at();

COMMIT;