From eff8bca32a6a7e732f060f1b5528a361cac588fb Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Fri, 2 Oct 2020 18:45:20 +0200 Subject: [PATCH] Add missing "IF NOT EXISTS" --- .../postgres/deltas/20201001204705_last_seen_ts_ip.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 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 85b3a4862..4f5f2b172 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,8 +1,8 @@ -- +goose Up -- +goose StatementBegin -ALTER TABLE device_devices ADD COLUMN last_seen_ts BIGINT NOT NULL; -ALTER TABLE device_devices ADD COLUMN ip TEXT; -ALTER TABLE device_devices ADD COLUMN user_agent TEXT; +ALTER TABLE device_devices ADD COLUMN IF NOT EXISTS last_seen_ts BIGINT NOT NULL; +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 -- +goose Down