You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2017/06/22 20:20:56 UTC
[03/17] incubator-trafficcontrol git commit: only update type field
if value is null
only update type field if value is null
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/b6d26040
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/b6d26040
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/b6d26040
Branch: refs/heads/master
Commit: b6d260405565328496c577d732cafa435d9da635
Parents: c25547c
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Fri Jun 9 21:47:27 2017 +0000
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Thu Jun 22 14:18:17 2017 -0600
----------------------------------------------------------------------
traffic_ops/app/db/patches.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/b6d26040/traffic_ops/app/db/patches.sql
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/patches.sql b/traffic_ops/app/db/patches.sql
index 660d2d8..7e96e74 100644
--- a/traffic_ops/app/db/patches.sql
+++ b/traffic_ops/app/db/patches.sql
@@ -15,5 +15,5 @@
-- THIS FILE INCLUDES POST-MIGRATION DATA FIXES REQUIRED OF TRAFFIC OPS
-UPDATE steering_target SET "type" = (SELECT id FROM type WHERE name = 'STEERING_WEIGHT');
-ALTER TABLE steering_target ALTER COLUMN type SET NOT NULL;
+UPDATE steering_target SET "type" = (SELECT id FROM type WHERE name = 'STEERING_WEIGHT') where "type" is NULL;;
+ALTER TABLE steering_target ALTER COLUMN type SET NOT NULL;
\ No newline at end of file