10 lines
163 B
PL/PgSQL
10 lines
163 B
PL/PgSQL
CREATE OR REPLACE FUNCTION updated_at_timestamp() RETURNS TRIGGER
|
|
LANGUAGE plpgsql
|
|
AS
|
|
$$
|
|
BEGIN
|
|
NEW.updatedAt = CURRENT_TIMESTAMP;
|
|
RETURN NEW;
|
|
END;
|
|
$$;
|