You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by jv...@apache.org on 2017/02/27 17:16:50 UTC

[07/20] incubator-trafficcontrol git commit: psql fixes and remove any_map bug

psql fixes and remove any_map bug


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

Branch: refs/heads/master
Commit: 3902e8c6398c5e066bf81248c32d39920b1fe89d
Parents: 4362e31
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Wed Jan 18 15:20:00 2017 -0500
Committer: Jan van Doorn <jv...@apache.org>
Committed: Mon Feb 27 16:57:46 2017 +0000

----------------------------------------------------------------------
 .../20161216094845_add_scope_parameters.sql     | 146 -------------------
 1 file changed, 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/3902e8c6/traffic_ops/app/db/migrations/20161216094845_add_scope_parameters.sql
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/migrations/20161216094845_add_scope_parameters.sql b/traffic_ops/app/db/migrations/20161216094845_add_scope_parameters.sql
deleted file mode 100644
index 40dbfb9..0000000
--- a/traffic_ops/app/db/migrations/20161216094845_add_scope_parameters.sql
+++ /dev/null
@@ -1,146 +0,0 @@
-
--- +goose Up
--- SQL in section 'Up' is executed when this migration is applied
-INSERT INTO
-   PARAMETER (name, config_file, VALUE) 
-   SELECT
-      'scope',
-      config_file,
-      'server' 
-   FROM
-      PARAMETER 
-   WHERE
-      name = 'location' 
-      AND config_file LIKE 'to_ext_%' 
-      OR name = 'location' 
-      AND config_file = '12M_facts' 
-      OR name = 'location' 
-      AND config_file = 'ip_allow.config' 
-      OR name = 'location' 
-      AND config_file = 'parent.config' 
-      OR name = 'location' 
-      AND config_file = 'records.config' 
-      OR name = 'location' 
-      AND config_file = 'remap.config' 
-      OR name = 'location' 
-      AND config_file = 'hosting.config' 
-      OR name = 'location' 
-      AND config_file = 'traffic_ops_ort_syncds.cron' 
-      OR name = 'location' 
-      AND config_file = 'cache.config';
-INSERT INTO
-   PARAMETER (name, config_file, VALUE) 
-   SELECT
-      'scope',
-      config_file,
-      'cdn' 
-   FROM
-      PARAMETER 
-   WHERE
-      name = 'location' 
-      AND config_file LIKE 'cacheurl%' 
-      OR name = 'location' 
-      AND config_file LIKE 'hdr_rw_%' 
-      OR name = 'location' 
-      AND config_file LIKE 'regex_remap_%' 
-      OR name = 'location' 
-      AND config_file = 'regex_revalidate.config' 
-      OR name = 'location' 
-      AND config_file LIKE 'set_dscp_%' 
-      OR name = 'location' 
-      AND config_file = 'ssl_multicert.config' 
-      OR name = 'location' 
-      AND config_file = 'bg_fetch.config';
-INSERT INTO
-   PARAMETER (name, config_file, VALUE) 
-   SELECT
-      'scope',
-      config_file,
-      'profile' 
-   FROM
-      PARAMETER 
-   WHERE
-      name = 'location' 
-      AND config_file = '50-ats.rules' 
-      OR name = 'location' 
-      AND config_file = 'astats.config' 
-      OR name = 'location' 
-      AND config_file = 'drop_qstring.config' 
-      OR name = 'location' 
-      AND config_file = 'logs_xml.config' 
-      OR name = 'location' 
-      AND config_file = 'plugin.config' 
-      OR name = 'location' 
-      AND config_file = 'storage.config' 
-      OR name = 'location' 
-      AND config_file = 'sysctl.conf' 
-      OR name = 'location' 
-      AND config_file LIKE 'url_sig_%' 
-      OR name = 'location' 
-      AND config_file = 'volume.config';
-INSERT INTO
-   profile_parameter (profile, PARAMETER) (
-   SELECT DISTINCT
-      p3.profile, p2.id AS scope_id 
-   FROM
-      (
-         SELECT
-            id,
-            config_file,
-            name 
-         FROM
-            PARAMETER 
-         WHERE
-            name = 'location'
-      )
-      p1 
-      INNER JOIN
-         (
-            SELECT
-               id,
-               config_file,
-               name 
-            FROM
-               PARAMETER 
-            WHERE
-               name = 'scope'
-         )
-         p2 
-         ON (p1.config_file = p2.config_file) 
-      INNER JOIN
-         profile_parameter p3 
-         ON (p1.id = p3.PARAMETER));
-
-
--- +goose Down
--- SQL section 'Down' is executed when this migration is rolled back
-DELETE
-FROM
-   profile_parameter 
-WHERE
-   PARAMETER IN 
-   (
-      SELECT DISTINCT
-         p1.id AS scope_id 
-      FROM
-         (
-            SELECT
-               id,
-               config_file,
-               name 
-            FROM
-               PARAMETER 
-            WHERE
-               name = 'scope'
-         )
-         p1 
-         INNER JOIN
-            profile_parameter p2 
-            ON (p1.id = p2.PARAMETER)
-   )
-;
-DELETE
-FROM
-   PARAMETER 
-WHERE
-   name = 'scope';