Use default value when adding column which is not null
MODIFY
userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql
userapi/storage/devices/postgres/deltas/20201001204705_last_seen_ts_ip.sql
-- +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

Use default value when adding column which is not null (#1501)

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>