diff options
author | S7evinK <tfaelligen@gmail.com> | 2020-10-09 13:41:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 12:41:53 +0100 |
commit | 2bd0449c5b2b5cbefffbe145f6c4c183e4ff0552 (patch) | |
tree | 5b8e5e86964038a4646ea86254fb5881fb5feb11 /userapi/storage | |
parent | 1cd525ef0d7b6209232f93c4d0527a0fccfcdb4f (diff) |
Use default value when adding column which is not null (#1501)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Diffstat (limited to 'userapi/storage')
-rw-r--r-- | userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql b/userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql index 4f5f2b17..e7900b0b 100644 --- a/userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql +++ b/userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql @@ -1,6 +1,6 @@ -- +goose Up -- +goose StatementBegin -ALTER TABLE device_devices ADD COLUMN IF NOT EXISTS last_seen_ts BIGINT NOT NULL; +ALTER TABLE device_devices ADD COLUMN IF NOT EXISTS last_seen_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)*1000; ALTER TABLE device_devices ADD COLUMN IF NOT EXISTS ip TEXT; ALTER TABLE device_devices ADD COLUMN IF NOT EXISTS user_agent TEXT; -- +goose StatementEnd |