fp/services/migrations-schema/migrations/00073_update-builds-table-t...

15 lines
261 B
SQL

ALTER TABLE api.builds
ALTER COLUMN created_at SET DEFAULT now();
ALTER TABLE api.builds
ALTER COLUMN updated_at SET DEFAULT now();
CREATE TRIGGER update_builds
BEFORE UPDATE ON api.builds
FOR EACH ROW
EXECUTE PROCEDURE moddatetime(updated_at);