trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/4] incubator-trafficcontrol git commit: add migration
Date Tue, 11 Jul 2017 17:21:43 GMT
add migration


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0e778db5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0e778db5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0e778db5

Branch: refs/heads/master
Commit: 0e778db54f32efb64b004e90e91f65cd667b8e99
Parents: e37b4da
Author: Derek Gelinas <derek_gelinas@cable.comcast.com>
Authored: Tue Jul 11 16:11:19 2017 +0000
Committer: Jeff Elsloo <jeffrey_elsloo@cable.comcast.com>
Committed: Tue Jul 11 11:21:12 2017 -0600

----------------------------------------------------------------------
 .../20170711160724_steering_target_fk.sql       | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0e778db5/traffic_ops/app/db/migrations/20170711160724_steering_target_fk.sql
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/migrations/20170711160724_steering_target_fk.sql b/traffic_ops/app/db/migrations/20170711160724_steering_target_fk.sql
new file mode 100644
index 0000000..e30c294
--- /dev/null
+++ b/traffic_ops/app/db/migrations/20170711160724_steering_target_fk.sql
@@ -0,0 +1,29 @@
+/*
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE public.steering_target
+DROP CONSTRAINT fk_steering_target_target,
+ADD CONSTRAINT fk_steering_target_target
+  FOREIGN KEY (target)
+  REFERENCES public.deliveryservice (id)
+  ON DELETE CASCADE
+  ON UPDATE CASCADE;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+


Mime
View raw message