● Zion Boggan
repos/Drophawk/backend/migrations/20260101000001_set_updated_at_fn.sql
zionboggan.com ↗
6 lines · sql
History for this file →
1
CREATE OR REPLACE FUNCTION set_updated_at() RETURNS TRIGGER AS $$
2
BEGIN
3
    NEW.updated_at := NOW();
4
    RETURN NEW;
5
END;
6
$$ LANGUAGE plpgsql;