Files
threshold/internal/db/schema/migrations/oss/postgres/17/01_servers.up.sql
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
549 B
PL/PgSQL
Raw Normal View History

-- Copyright (c) HashiCorp, Inc.
-- SPDX-License-Identifier: BUSL-1.1
2023-02-02 17:15:17 -08:00
begin;
-- server table inserts/updates historically included setting the update_time
-- column to now(). Since we're now using the "standard" db package to do this,
-- we need to add triggers to set the update_time for every insert/update.
2022-08-08 18:17:57 -04:00
create trigger update_time_column before update on server
for each row execute procedure update_time_column();
2022-08-08 18:17:57 -04:00
create trigger insert_time_column before insert on server
for each row execute procedure update_time_column();
2022-08-08 18:17:57 -04:00
commit;