You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/12/06 05:21:29 UTC

[5/6] incubator-trafficcontrol git commit: Merge branch 'rat-and-apache-license' into apache-license-docker

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f13fb5cb/traffic_ops/app/db/create_tables.sql
----------------------------------------------------------------------
diff --cc traffic_ops/app/db/create_tables.sql
index cf04fd5,f37931c..c099efd
--- a/traffic_ops/app/db/create_tables.sql
+++ b/traffic_ops/app/db/create_tables.sql
@@@ -1,2885 -1,694 +1,2899 @@@
+ /*
+ 
+     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.
+ */
 +--
 +-- PostgreSQL database dump
 +--
 +
 +-- Dumped from database version 9.5.4
 +-- Dumped by pg_dump version 9.5.5
 +
 +SET statement_timeout = 0;
 +SET lock_timeout = 0;
 +SET client_encoding = 'UTF8';
 +SET standard_conforming_strings = on;
 +SET check_function_bodies = false;
 +SET client_min_messages = warning;
 +SET row_security = off;
 +
 +--
 +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
 +--
 +
 +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
 +
 +
 +--
 +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
 +--
 +
 +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
 +
 +
 +SET search_path = public, pg_catalog;
 +
 +--
 +-- Name: on_update_current_timestamp_last_updated(); Type: FUNCTION; Schema: public; Owner: to_user
 +--
 +
 +CREATE FUNCTION on_update_current_timestamp_last_updated() RETURNS trigger
 +    LANGUAGE plpgsql
 +    AS $$
 +BEGIN
 +  NEW.last_updated = now();
 +  RETURN NEW;
 +END;
 +$$;
 +
 +
 +ALTER FUNCTION public.on_update_current_timestamp_last_updated() OWNER TO to_user;
 +
 +SET default_tablespace = '';
 +
 +SET default_with_oids = false;
 +
 +--
 +-- Name: asn; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE asn (
 +    id bigint NOT NULL,
 +    asn bigint NOT NULL,
 +    cachegroup bigint DEFAULT '0'::bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE asn OWNER TO to_user;
 +
 +--
 +-- Name: asn_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE asn_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE asn_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: asn_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE asn_id_seq OWNED BY asn.id;
 +
 +
 +--
 +-- Name: cachegroup; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE cachegroup (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    short_name text NOT NULL,
 +    latitude numeric,
 +    longitude numeric,
 +    parent_cachegroup_id bigint,
 +    secondary_parent_cachegroup_id bigint,
 +    type bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE cachegroup OWNER TO to_user;
 +
 +--
 +-- Name: cachegroup_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE cachegroup_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE cachegroup_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: cachegroup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE cachegroup_id_seq OWNED BY cachegroup.id;
 +
 +
 +--
 +-- Name: cachegroup_parameter; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE cachegroup_parameter (
 +    cachegroup bigint DEFAULT '0'::bigint NOT NULL,
 +    parameter bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE cachegroup_parameter OWNER TO to_user;
 +
 +--
 +-- Name: cdn; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE cdn (
 +    id bigint NOT NULL,
 +    name text,
 +    last_updated timestamp with time zone DEFAULT now() NOT NULL,
 +    dnssec_enabled boolean DEFAULT false NOT NULL
 +);
 +
 +
 +ALTER TABLE cdn OWNER TO to_user;
 +
 +--
 +-- Name: cdn_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE cdn_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE cdn_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: cdn_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE cdn_id_seq OWNED BY cdn.id;
 +
 +
 +--
 +-- Name: deliveryservice; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE deliveryservice (
 +    id bigint NOT NULL,
 +    xml_id text NOT NULL,
 +    active boolean DEFAULT false NOT NULL,
 +    dscp bigint NOT NULL,
 +    signed boolean DEFAULT false,
 +    qstring_ignore smallint,
 +    geo_limit smallint DEFAULT '0'::smallint,
 +    http_bypass_fqdn text,
 +    dns_bypass_ip text,
 +    dns_bypass_ip6 text,
 +    dns_bypass_ttl bigint,
 +    org_server_fqdn text,
 +    type bigint NOT NULL,
 +    profile bigint NOT NULL,
 +    cdn_id bigint NOT NULL,
 +    ccr_dns_ttl bigint,
 +    global_max_mbps bigint,
 +    global_max_tps bigint,
 +    long_desc text,
 +    long_desc_1 text,
 +    long_desc_2 text,
 +    max_dns_answers bigint DEFAULT '0'::bigint,
 +    info_url text,
 +    miss_lat numeric,
 +    miss_long numeric,
 +    check_path text,
 +    last_updated timestamp with time zone DEFAULT now(),
 +    protocol smallint DEFAULT '0'::smallint,
 +    ssl_key_version bigint DEFAULT '0'::bigint,
 +    ipv6_routing_enabled boolean DEFAULT false,
 +    range_request_handling smallint DEFAULT '0'::smallint,
 +    edge_header_rewrite text,
 +    origin_shield text,
 +    mid_header_rewrite text,
 +    regex_remap text,
 +    cacheurl text,
 +    remap_text text,
 +    multi_site_origin boolean DEFAULT false,
 +    display_name text NOT NULL,
 +    tr_response_headers text,
 +    initial_dispersion bigint DEFAULT '1'::bigint,
 +    dns_bypass_cname text,
 +    tr_request_headers text,
 +    regional_geo_blocking boolean DEFAULT false NOT NULL,
 +    geo_provider smallint DEFAULT '0'::smallint,
 +    geo_limit_countries text,
 +    logs_enabled boolean DEFAULT false,
 +    multi_site_origin_algorithm smallint,
 +    geolimit_redirect_url text
 +);
 +
 +
 +ALTER TABLE deliveryservice OWNER TO to_user;
 +
 +--
 +-- Name: deliveryservice_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE deliveryservice_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE deliveryservice_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: deliveryservice_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE deliveryservice_id_seq OWNED BY deliveryservice.id;
 +
 +
 +--
 +-- Name: deliveryservice_regex; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE deliveryservice_regex (
 +    deliveryservice bigint NOT NULL,
 +    regex bigint NOT NULL,
 +    set_number bigint DEFAULT '0'::bigint
 +);
 +
 +
 +ALTER TABLE deliveryservice_regex OWNER TO to_user;
 +
 +--
 +-- Name: deliveryservice_server; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE deliveryservice_server (
 +    deliveryservice bigint NOT NULL,
 +    server bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE deliveryservice_server OWNER TO to_user;
 +
 +--
 +-- Name: deliveryservice_tmuser; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE deliveryservice_tmuser (
 +    deliveryservice bigint NOT NULL,
 +    tm_user_id bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE deliveryservice_tmuser OWNER TO to_user;
 +
 +--
 +-- Name: division; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE division (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE division OWNER TO to_user;
 +
 +--
 +-- Name: division_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE division_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE division_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: division_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE division_id_seq OWNED BY division.id;
 +
 +
 +--
 +-- Name: federation; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE federation (
 +    id bigint NOT NULL,
 +    cname text NOT NULL,
 +    description text,
 +    ttl integer NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE federation OWNER TO to_user;
 +
 +--
 +-- Name: federation_deliveryservice; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE federation_deliveryservice (
 +    federation bigint NOT NULL,
 +    deliveryservice bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE federation_deliveryservice OWNER TO to_user;
 +
 +--
 +-- Name: federation_federation_resolver; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE federation_federation_resolver (
 +    federation bigint NOT NULL,
 +    federation_resolver bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE federation_federation_resolver OWNER TO to_user;
 +
 +--
 +-- Name: federation_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE federation_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE federation_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: federation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE federation_id_seq OWNED BY federation.id;
 +
 +
 +--
 +-- Name: federation_resolver; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE federation_resolver (
 +    id bigint NOT NULL,
 +    ip_address text NOT NULL,
 +    type bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE federation_resolver OWNER TO to_user;
 +
 +--
 +-- Name: federation_resolver_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE federation_resolver_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE federation_resolver_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: federation_resolver_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE federation_resolver_id_seq OWNED BY federation_resolver.id;
 +
 +
 +--
 +-- Name: federation_tmuser; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE federation_tmuser (
 +    federation bigint NOT NULL,
 +    tm_user bigint NOT NULL,
 +    role bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE federation_tmuser OWNER TO to_user;
 +
 +--
 +-- Name: hwinfo; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE hwinfo (
 +    id bigint NOT NULL,
 +    serverid bigint NOT NULL,
 +    description text NOT NULL,
 +    val text NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE hwinfo OWNER TO to_user;
 +
 +--
 +-- Name: hwinfo_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE hwinfo_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE hwinfo_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: hwinfo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE hwinfo_id_seq OWNED BY hwinfo.id;
 +
 +
 +--
 +-- Name: job; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE job (
 +    id bigint NOT NULL,
 +    agent bigint,
 +    object_type text,
 +    object_name text,
 +    keyword text NOT NULL,
 +    parameters text,
 +    asset_url text NOT NULL,
 +    asset_type text NOT NULL,
 +    status bigint NOT NULL,
 +    start_time timestamp with time zone NOT NULL,
 +    entered_time timestamp with time zone NOT NULL,
 +    job_user bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now(),
 +    job_deliveryservice bigint
 +);
 +
 +
 +ALTER TABLE job OWNER TO to_user;
 +
 +--
 +-- Name: job_agent; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE job_agent (
 +    id bigint NOT NULL,
 +    name text,
 +    description text,
 +    active integer DEFAULT 0 NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE job_agent OWNER TO to_user;
 +
 +--
 +-- Name: job_agent_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE job_agent_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE job_agent_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: job_agent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE job_agent_id_seq OWNED BY job_agent.id;
 +
 +
 +--
 +-- Name: job_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE job_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE job_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE job_id_seq OWNED BY job.id;
 +
 +
 +--
 +-- Name: job_result; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE job_result (
 +    id bigint NOT NULL,
 +    job bigint NOT NULL,
 +    agent bigint NOT NULL,
 +    result text NOT NULL,
 +    description text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE job_result OWNER TO to_user;
 +
 +--
 +-- Name: job_result_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE job_result_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE job_result_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: job_result_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE job_result_id_seq OWNED BY job_result.id;
 +
 +
 +--
 +-- Name: job_status; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE job_status (
 +    id bigint NOT NULL,
 +    name text,
 +    description text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE job_status OWNER TO to_user;
 +
 +--
 +-- Name: job_status_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE job_status_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE job_status_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: job_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE job_status_id_seq OWNED BY job_status.id;
 +
 +
 +--
 +-- Name: log; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE log (
 +    id bigint NOT NULL,
 +    level text,
 +    message text NOT NULL,
 +    tm_user bigint NOT NULL,
 +    ticketnum text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE log OWNER TO to_user;
 +
 +--
 +-- Name: log_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE log_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE log_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE log_id_seq OWNED BY log.id;
 +
 +
 +--
 +-- Name: parameter; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE parameter (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    config_file text,
 +    value text NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now(),
 +    secure boolean DEFAULT false NOT NULL
 +);
 +
 +
 +ALTER TABLE parameter OWNER TO to_user;
 +
 +--
 +-- Name: parameter_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE parameter_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE parameter_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: parameter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE parameter_id_seq OWNED BY parameter.id;
 +
 +
 +--
 +-- Name: phys_location; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE phys_location (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    short_name text NOT NULL,
 +    address text NOT NULL,
 +    city text NOT NULL,
 +    state text NOT NULL,
 +    zip text NOT NULL,
 +    poc text,
 +    phone text,
 +    email text,
 +    comments text,
 +    region bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE phys_location OWNER TO to_user;
 +
 +--
 +-- Name: phys_location_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE phys_location_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE phys_location_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: phys_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE phys_location_id_seq OWNED BY phys_location.id;
 +
 +
 +--
 +-- Name: profile; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE profile (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    description text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE profile OWNER TO to_user;
 +
 +--
 +-- Name: profile_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE profile_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE profile_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: profile_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE profile_id_seq OWNED BY profile.id;
 +
 +
 +--
 +-- Name: profile_parameter; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE profile_parameter (
 +    profile bigint NOT NULL,
 +    parameter bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE profile_parameter OWNER TO to_user;
 +
 +--
 +-- Name: regex; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE regex (
 +    id bigint NOT NULL,
 +    pattern text DEFAULT ''::text NOT NULL,
 +    type bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE regex OWNER TO to_user;
 +
 +--
 +-- Name: regex_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE regex_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE regex_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: regex_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE regex_id_seq OWNED BY regex.id;
 +
 +
 +--
 +-- Name: region; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE region (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    division bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE region OWNER TO to_user;
 +
 +--
 +-- Name: region_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE region_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE region_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: region_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE region_id_seq OWNED BY region.id;
 +
 +
 +--
 +-- Name: role; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE role (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    description text,
 +    priv_level bigint NOT NULL
 +);
 +
 +
 +ALTER TABLE role OWNER TO to_user;
 +
 +--
 +-- Name: role_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE role_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE role_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE role_id_seq OWNED BY role.id;
 +
 +
 +--
 +-- Name: server; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE server (
 +    id bigint NOT NULL,
 +    host_name text NOT NULL,
 +    domain_name text NOT NULL,
 +    tcp_port bigint,
 +    xmpp_id text,
 +    xmpp_passwd text,
 +    interface_name text NOT NULL,
 +    ip_address text NOT NULL,
 +    ip_netmask text NOT NULL,
 +    ip_gateway text NOT NULL,
 +    ip6_address text,
 +    ip6_gateway text,
 +    interface_mtu bigint DEFAULT '9000'::bigint NOT NULL,
 +    phys_location bigint NOT NULL,
 +    rack text,
 +    cachegroup bigint DEFAULT '0'::bigint NOT NULL,
 +    type bigint NOT NULL,
 +    status bigint NOT NULL,
 +    offline_reason text,
 +    upd_pending boolean DEFAULT false NOT NULL,
 +    profile bigint NOT NULL,
 +    cdn_id bigint NOT NULL,
 +    mgmt_ip_address text,
 +    mgmt_ip_netmask text,
 +    mgmt_ip_gateway text,
 +    ilo_ip_address text,
 +    ilo_ip_netmask text,
 +    ilo_ip_gateway text,
 +    ilo_username text,
 +    ilo_password text,
 +    router_host_name text,
 +    router_port_name text,
 +    guid text,
 +    last_updated timestamp with time zone DEFAULT now(),
 +    https_port bigint
 +);
 +
 +
 +ALTER TABLE server OWNER TO to_user;
 +
 +--
 +-- Name: server_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE server_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE server_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: server_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE server_id_seq OWNED BY server.id;
 +
 +
 +--
 +-- Name: servercheck; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE servercheck (
 +    id bigint NOT NULL,
 +    server bigint NOT NULL,
 +    aa bigint,
 +    ab bigint,
 +    ac bigint,
 +    ad bigint,
 +    ae bigint,
 +    af bigint,
 +    ag bigint,
 +    ah bigint,
 +    ai bigint,
 +    aj bigint,
 +    ak bigint,
 +    al bigint,
 +    am bigint,
 +    an bigint,
 +    ao bigint,
 +    ap bigint,
 +    aq bigint,
 +    ar bigint,
 +    bf bigint,
 +    at bigint,
 +    au bigint,
 +    av bigint,
 +    aw bigint,
 +    ax bigint,
 +    ay bigint,
 +    az bigint,
 +    ba bigint,
 +    bb bigint,
 +    bc bigint,
 +    bd bigint,
 +    be bigint,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE servercheck OWNER TO to_user;
 +
 +--
 +-- Name: servercheck_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE servercheck_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE servercheck_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: servercheck_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE servercheck_id_seq OWNED BY servercheck.id;
 +
 +
 +--
 +-- Name: staticdnsentry; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE staticdnsentry (
 +    id bigint NOT NULL,
 +    host text NOT NULL,
 +    address text NOT NULL,
 +    type bigint NOT NULL,
 +    ttl bigint DEFAULT '3600'::bigint NOT NULL,
 +    deliveryservice bigint NOT NULL,
 +    cachegroup bigint,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE staticdnsentry OWNER TO to_user;
 +
 +--
 +-- Name: staticdnsentry_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE staticdnsentry_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE staticdnsentry_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: staticdnsentry_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE staticdnsentry_id_seq OWNED BY staticdnsentry.id;
 +
 +
 +--
 +-- Name: stats_summary; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE stats_summary (
 +    id bigint NOT NULL,
 +    cdn_name text DEFAULT 'all'::text NOT NULL,
 +    deliveryservice_name text NOT NULL,
 +    stat_name text NOT NULL,
 +    stat_value double precision NOT NULL,
 +    summary_time timestamp with time zone DEFAULT now() NOT NULL,
 +    stat_date date
 +);
 +
 +
 +ALTER TABLE stats_summary OWNER TO to_user;
 +
 +--
 +-- Name: stats_summary_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE stats_summary_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE stats_summary_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: stats_summary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE stats_summary_id_seq OWNED BY stats_summary.id;
 +
 +
 +--
 +-- Name: status; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE status (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    description text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE status OWNER TO to_user;
 +
 +--
 +-- Name: status_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE status_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE status_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE status_id_seq OWNED BY status.id;
 +
 +
 +--
 +-- Name: steering_target; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE steering_target (
 +    deliveryservice bigint NOT NULL,
 +    target bigint NOT NULL,
 +    weight bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE steering_target OWNER TO to_user;
 +
 +--
 +-- Name: tm_user; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE tm_user (
 +    id bigint NOT NULL,
 +    username text,
 +    public_ssh_key text,
 +    role bigint,
 +    uid bigint,
 +    gid bigint,
 +    local_passwd text,
 +    confirm_local_passwd text,
 +    last_updated timestamp with time zone DEFAULT now(),
 +    company text,
 +    email text,
 +    full_name text,
 +    new_user boolean DEFAULT false NOT NULL,
 +    address_line1 text,
 +    address_line2 text,
 +    city text,
 +    state_or_province text,
 +    phone_number text,
 +    postal_code text,
 +    country text,
 +    token text,
 +    registration_sent timestamp with time zone
 +);
 +
 +
 +ALTER TABLE tm_user OWNER TO to_user;
 +
 +--
 +-- Name: tm_user_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE tm_user_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE tm_user_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: tm_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE tm_user_id_seq OWNED BY tm_user.id;
 +
 +
 +--
 +-- Name: to_extension; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE to_extension (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    version text NOT NULL,
 +    info_url text NOT NULL,
 +    script_file text NOT NULL,
 +    isactive boolean DEFAULT false NOT NULL,
 +    additional_config_json text,
 +    description text,
 +    servercheck_short_name text,
 +    servercheck_column_name text,
 +    type bigint NOT NULL,
 +    last_updated timestamp with time zone DEFAULT now() NOT NULL
 +);
 +
 +
 +ALTER TABLE to_extension OWNER TO to_user;
 +
 +--
 +-- Name: to_extension_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE to_extension_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE to_extension_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: to_extension_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE to_extension_id_seq OWNED BY to_extension.id;
 +
 +
 +--
 +-- Name: type; Type: TABLE; Schema: public; Owner: to_user
 +--
 +
 +CREATE TABLE type (
 +    id bigint NOT NULL,
 +    name text NOT NULL,
 +    description text,
 +    use_in_table text,
 +    last_updated timestamp with time zone DEFAULT now()
 +);
 +
 +
 +ALTER TABLE type OWNER TO to_user;
 +
 +--
 +-- Name: type_id_seq; Type: SEQUENCE; Schema: public; Owner: to_user
 +--
 +
 +CREATE SEQUENCE type_id_seq
 +    START WITH 1
 +    INCREMENT BY 1
 +    NO MINVALUE
 +    NO MAXVALUE
 +    CACHE 1;
 +
 +
 +ALTER TABLE type_id_seq OWNER TO to_user;
 +
 +--
 +-- Name: type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: to_user
 +--
 +
 +ALTER SEQUENCE type_id_seq OWNED BY type.id;
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY asn ALTER COLUMN id SET DEFAULT nextval('asn_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup ALTER COLUMN id SET DEFAULT nextval('cachegroup_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cdn ALTER COLUMN id SET DEFAULT nextval('cdn_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice ALTER COLUMN id SET DEFAULT nextval('deliveryservice_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY division ALTER COLUMN id SET DEFAULT nextval('division_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation ALTER COLUMN id SET DEFAULT nextval('federation_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_resolver ALTER COLUMN id SET DEFAULT nextval('federation_resolver_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY hwinfo ALTER COLUMN id SET DEFAULT nextval('hwinfo_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job ALTER COLUMN id SET DEFAULT nextval('job_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_agent ALTER COLUMN id SET DEFAULT nextval('job_agent_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_result ALTER COLUMN id SET DEFAULT nextval('job_result_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_status ALTER COLUMN id SET DEFAULT nextval('job_status_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY log ALTER COLUMN id SET DEFAULT nextval('log_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY parameter ALTER COLUMN id SET DEFAULT nextval('parameter_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY phys_location ALTER COLUMN id SET DEFAULT nextval('phys_location_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY profile ALTER COLUMN id SET DEFAULT nextval('profile_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY regex ALTER COLUMN id SET DEFAULT nextval('regex_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY region ALTER COLUMN id SET DEFAULT nextval('region_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY role ALTER COLUMN id SET DEFAULT nextval('role_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server ALTER COLUMN id SET DEFAULT nextval('server_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY servercheck ALTER COLUMN id SET DEFAULT nextval('servercheck_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY staticdnsentry ALTER COLUMN id SET DEFAULT nextval('staticdnsentry_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY stats_summary ALTER COLUMN id SET DEFAULT nextval('stats_summary_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY status ALTER COLUMN id SET DEFAULT nextval('status_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY tm_user ALTER COLUMN id SET DEFAULT nextval('tm_user_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY to_extension ALTER COLUMN id SET DEFAULT nextval('to_extension_id_seq'::regclass);
 +
 +
 +--
 +-- Name: id; Type: DEFAULT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY type ALTER COLUMN id SET DEFAULT nextval('type_id_seq'::regclass);
 +
 +
 +--
 +-- Name: idx_89468_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY asn
 +    ADD CONSTRAINT idx_89468_primary PRIMARY KEY (id, cachegroup);
 +
 +
 +--
 +-- Name: idx_89476_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup
 +    ADD CONSTRAINT idx_89476_primary PRIMARY KEY (id, type);
 +
 +
 +--
 +-- Name: idx_89484_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup_parameter
 +    ADD CONSTRAINT idx_89484_primary PRIMARY KEY (cachegroup, parameter);
 +
 +
 +--
 +-- Name: idx_89491_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cdn
 +    ADD CONSTRAINT idx_89491_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89502_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice
 +    ADD CONSTRAINT idx_89502_primary PRIMARY KEY (id, type);
 +
 +
 +--
 +-- Name: idx_89517_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_regex
 +    ADD CONSTRAINT idx_89517_primary PRIMARY KEY (deliveryservice, regex);
 +
 +
 +--
 +-- Name: idx_89521_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_server
 +    ADD CONSTRAINT idx_89521_primary PRIMARY KEY (deliveryservice, server);
 +
 +
 +--
 +-- Name: idx_89525_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_tmuser
 +    ADD CONSTRAINT idx_89525_primary PRIMARY KEY (deliveryservice, tm_user_id);
 +
 +
 +--
 +-- Name: idx_89531_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY division
 +    ADD CONSTRAINT idx_89531_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89541_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation
 +    ADD CONSTRAINT idx_89541_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89549_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_deliveryservice
 +    ADD CONSTRAINT idx_89549_primary PRIMARY KEY (federation, deliveryservice);
 +
 +
 +--
 +-- Name: idx_89553_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_federation_resolver
 +    ADD CONSTRAINT idx_89553_primary PRIMARY KEY (federation, federation_resolver);
 +
 +
 +--
 +-- Name: idx_89559_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_resolver
 +    ADD CONSTRAINT idx_89559_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89567_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_tmuser
 +    ADD CONSTRAINT idx_89567_primary PRIMARY KEY (federation, tm_user);
 +
 +
 +--
 +-- Name: idx_89583_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY hwinfo
 +    ADD CONSTRAINT idx_89583_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89593_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job
 +    ADD CONSTRAINT idx_89593_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89603_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_agent
 +    ADD CONSTRAINT idx_89603_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89614_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_result
 +    ADD CONSTRAINT idx_89614_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89624_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_status
 +    ADD CONSTRAINT idx_89624_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89634_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY log
 +    ADD CONSTRAINT idx_89634_primary PRIMARY KEY (id, tm_user);
 +
 +
 +--
 +-- Name: idx_89644_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY parameter
 +    ADD CONSTRAINT idx_89644_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89655_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY phys_location
 +    ADD CONSTRAINT idx_89655_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89665_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY profile
 +    ADD CONSTRAINT idx_89665_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89673_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY profile_parameter
 +    ADD CONSTRAINT idx_89673_primary PRIMARY KEY (profile, parameter);
 +
 +
 +--
 +-- Name: idx_89679_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY regex
 +    ADD CONSTRAINT idx_89679_primary PRIMARY KEY (id, type);
 +
 +
 +--
 +-- Name: idx_89690_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY region
 +    ADD CONSTRAINT idx_89690_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89700_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY role
 +    ADD CONSTRAINT idx_89700_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89709_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT idx_89709_primary PRIMARY KEY (id, cachegroup, type, status, profile);
 +
 +
 +--
 +-- Name: idx_89722_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY servercheck
 +    ADD CONSTRAINT idx_89722_primary PRIMARY KEY (id, server);
 +
 +
 +--
 +-- Name: idx_89729_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY staticdnsentry
 +    ADD CONSTRAINT idx_89729_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89740_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY stats_summary
 +    ADD CONSTRAINT idx_89740_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89751_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY status
 +    ADD CONSTRAINT idx_89751_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89759_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY steering_target
 +    ADD CONSTRAINT idx_89759_primary PRIMARY KEY (deliveryservice, target);
 +
 +
 +--
 +-- Name: idx_89765_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY tm_user
 +    ADD CONSTRAINT idx_89765_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89776_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY to_extension
 +    ADD CONSTRAINT idx_89776_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89786_primary; Type: CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY type
 +    ADD CONSTRAINT idx_89786_primary PRIMARY KEY (id);
 +
 +
 +--
 +-- Name: idx_89468_cr_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89468_cr_id_unique ON asn USING btree (id);
 +
 +
 +--
 +-- Name: idx_89468_fk_cran_cachegroup1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89468_fk_cran_cachegroup1 ON asn USING btree (cachegroup);
 +
 +
 +--
 +-- Name: idx_89476_cg_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89476_cg_name_unique ON cachegroup USING btree (name);
 +
 +
 +--
 +-- Name: idx_89476_cg_short_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89476_cg_short_unique ON cachegroup USING btree (short_name);
 +
 +
 +--
 +-- Name: idx_89476_fk_cg_1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89476_fk_cg_1 ON cachegroup USING btree (parent_cachegroup_id);
 +
 +
 +--
 +-- Name: idx_89476_fk_cg_secondary; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89476_fk_cg_secondary ON cachegroup USING btree (secondary_parent_cachegroup_id);
 +
 +
 +--
 +-- Name: idx_89476_fk_cg_type1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89476_fk_cg_type1 ON cachegroup USING btree (type);
 +
 +
 +--
 +-- Name: idx_89476_lo_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89476_lo_id_unique ON cachegroup USING btree (id);
 +
 +
 +--
 +-- Name: idx_89484_fk_parameter; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89484_fk_parameter ON cachegroup_parameter USING btree (parameter);
 +
 +
 +--
 +-- Name: idx_89491_cdn_cdn_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89491_cdn_cdn_unique ON cdn USING btree (name);
 +
 +
 +--
 +-- Name: idx_89502_ds_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89502_ds_id_unique ON deliveryservice USING btree (id);
 +
 +
 +--
 +-- Name: idx_89502_ds_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89502_ds_name_unique ON deliveryservice USING btree (xml_id);
 +
 +
 +--
 +-- Name: idx_89502_fk_cdn1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89502_fk_cdn1 ON deliveryservice USING btree (cdn_id);
 +
 +
 +--
 +-- Name: idx_89502_fk_deliveryservice_profile1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89502_fk_deliveryservice_profile1 ON deliveryservice USING btree (profile);
 +
 +
 +--
 +-- Name: idx_89502_fk_deliveryservice_type1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89502_fk_deliveryservice_type1 ON deliveryservice USING btree (type);
 +
 +
 +--
 +-- Name: idx_89517_fk_ds_to_regex_regex1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89517_fk_ds_to_regex_regex1 ON deliveryservice_regex USING btree (regex);
 +
 +
 +--
 +-- Name: idx_89521_fk_ds_to_cs_contentserver1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89521_fk_ds_to_cs_contentserver1 ON deliveryservice_server USING btree (server);
 +
 +
 +--
 +-- Name: idx_89525_fk_tm_userid; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89525_fk_tm_userid ON deliveryservice_tmuser USING btree (tm_user_id);
 +
 +
 +--
 +-- Name: idx_89531_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89531_name_unique ON division USING btree (name);
 +
 +
 +--
 +-- Name: idx_89549_fk_fed_to_ds1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89549_fk_fed_to_ds1 ON federation_deliveryservice USING btree (deliveryservice);
 +
 +
 +--
 +-- Name: idx_89553_fk_federation_federation_resolver; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89553_fk_federation_federation_resolver ON federation_federation_resolver USING btree (federation);
 +
 +
 +--
 +-- Name: idx_89553_fk_federation_resolver_to_fed1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89553_fk_federation_resolver_to_fed1 ON federation_federation_resolver USING btree (federation_resolver);
 +
 +
 +--
 +-- Name: idx_89559_federation_resolver_ip_address; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89559_federation_resolver_ip_address ON federation_resolver USING btree (ip_address);
 +
 +
 +--
 +-- Name: idx_89559_fk_federation_mapping_type; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89559_fk_federation_mapping_type ON federation_resolver USING btree (type);
 +
 +
 +--
 +-- Name: idx_89567_fk_federation_federation_resolver; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89567_fk_federation_federation_resolver ON federation_tmuser USING btree (federation);
 +
 +
 +--
 +-- Name: idx_89567_fk_federation_tmuser_role; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89567_fk_federation_tmuser_role ON federation_tmuser USING btree (role);
 +
 +
 +--
 +-- Name: idx_89567_fk_federation_tmuser_tmuser; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89567_fk_federation_tmuser_tmuser ON federation_tmuser USING btree (tm_user);
 +
 +
 +--
 +-- Name: idx_89583_fk_hwinfo1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89583_fk_hwinfo1 ON hwinfo USING btree (serverid);
 +
 +
 +--
 +-- Name: idx_89583_serverid; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89583_serverid ON hwinfo USING btree (serverid, description);
 +
 +
 +--
 +-- Name: idx_89593_fk_job_agent_id1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89593_fk_job_agent_id1 ON job USING btree (agent);
 +
 +
 +--
 +-- Name: idx_89593_fk_job_deliveryservice1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89593_fk_job_deliveryservice1 ON job USING btree (job_deliveryservice);
 +
 +
 +--
 +-- Name: idx_89593_fk_job_status_id1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89593_fk_job_status_id1 ON job USING btree (status);
 +
 +
 +--
 +-- Name: idx_89593_fk_job_user_id1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89593_fk_job_user_id1 ON job USING btree (job_user);
 +
 +
 +--
 +-- Name: idx_89614_fk_agent_id1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89614_fk_agent_id1 ON job_result USING btree (agent);
 +
 +
 +--
 +-- Name: idx_89614_fk_job_id1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89614_fk_job_id1 ON job_result USING btree (job);
 +
 +
 +--
 +-- Name: idx_89634_fk_log_1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89634_fk_log_1 ON log USING btree (tm_user);
 +
 +
 +--
 +-- Name: idx_89634_idx_last_updated; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89634_idx_last_updated ON log USING btree (last_updated);
 +
 +
 +--
 +-- Name: idx_89644_parameter_name_value_idx; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89644_parameter_name_value_idx ON parameter USING btree (name, value);
 +
 +
 +--
 +-- Name: idx_89655_fk_phys_location_region_idx; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89655_fk_phys_location_region_idx ON phys_location USING btree (region);
 +
 +
 +--
 +-- Name: idx_89655_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89655_name_unique ON phys_location USING btree (name);
 +
 +
 +--
 +-- Name: idx_89655_short_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89655_short_name_unique ON phys_location USING btree (short_name);
 +
 +
 +--
 +-- Name: idx_89665_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89665_name_unique ON profile USING btree (name);
 +
 +
 +--
 +-- Name: idx_89673_fk_atsprofile_atsparameters_atsparameters1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89673_fk_atsprofile_atsparameters_atsparameters1 ON profile_parameter USING btree (parameter);
 +
 +
 +--
 +-- Name: idx_89673_fk_atsprofile_atsparameters_atsprofile1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89673_fk_atsprofile_atsparameters_atsprofile1 ON profile_parameter USING btree (profile);
 +
 +
 +--
 +-- Name: idx_89679_fk_regex_type1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89679_fk_regex_type1 ON regex USING btree (type);
 +
 +
 +--
 +-- Name: idx_89679_re_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89679_re_id_unique ON regex USING btree (id);
 +
 +
 +--
 +-- Name: idx_89690_fk_region_division1_idx; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89690_fk_region_division1_idx ON region USING btree (division);
 +
 +
 +--
 +-- Name: idx_89690_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89690_name_unique ON region USING btree (name);
 +
 +
 +--
 +-- Name: idx_89709_fk_cdn2; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_cdn2 ON server USING btree (cdn_id);
 +
 +
 +--
 +-- Name: idx_89709_fk_contentserver_atsprofile1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_contentserver_atsprofile1 ON server USING btree (profile);
 +
 +
 +--
 +-- Name: idx_89709_fk_contentserver_contentserverstatus1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_contentserver_contentserverstatus1 ON server USING btree (status);
 +
 +
 +--
 +-- Name: idx_89709_fk_contentserver_contentservertype1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_contentserver_contentservertype1 ON server USING btree (type);
 +
 +
 +--
 +-- Name: idx_89709_fk_contentserver_phys_location1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_contentserver_phys_location1 ON server USING btree (phys_location);
 +
 +
 +--
 +-- Name: idx_89709_fk_server_cachegroup1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89709_fk_server_cachegroup1 ON server USING btree (cachegroup);
 +
 +
 +--
 +-- Name: idx_89709_ip6_profile; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89709_ip6_profile ON server USING btree (ip6_address, profile);
 +
 +
 +--
 +-- Name: idx_89709_ip_profile; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89709_ip_profile ON server USING btree (ip_address, profile);
 +
 +
 +--
 +-- Name: idx_89709_se_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89709_se_id_unique ON server USING btree (id);
 +
 +
 +--
 +-- Name: idx_89722_fk_serverstatus_server1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89722_fk_serverstatus_server1 ON servercheck USING btree (server);
 +
 +
 +--
 +-- Name: idx_89722_server; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89722_server ON servercheck USING btree (server);
 +
 +
 +--
 +-- Name: idx_89722_ses_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89722_ses_id_unique ON servercheck USING btree (id);
 +
 +
 +--
 +-- Name: idx_89729_combi_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89729_combi_unique ON staticdnsentry USING btree (host, address, deliveryservice, cachegroup);
 +
 +
 +--
 +-- Name: idx_89729_fk_staticdnsentry_cachegroup1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89729_fk_staticdnsentry_cachegroup1 ON staticdnsentry USING btree (cachegroup);
 +
 +
 +--
 +-- Name: idx_89729_fk_staticdnsentry_ds; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89729_fk_staticdnsentry_ds ON staticdnsentry USING btree (deliveryservice);
 +
 +
 +--
 +-- Name: idx_89729_fk_staticdnsentry_type; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89729_fk_staticdnsentry_type ON staticdnsentry USING btree (type);
 +
 +
 +--
 +-- Name: idx_89765_fk_user_1; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89765_fk_user_1 ON tm_user USING btree (role);
 +
 +
 +--
 +-- Name: idx_89765_tmuser_email_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89765_tmuser_email_unique ON tm_user USING btree (email);
 +
 +
 +--
 +-- Name: idx_89765_username_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89765_username_unique ON tm_user USING btree (username);
 +
 +
 +--
 +-- Name: idx_89776_fk_ext_type_idx; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE INDEX idx_89776_fk_ext_type_idx ON to_extension USING btree (type);
 +
 +
 +--
 +-- Name: idx_89776_id_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE UNIQUE INDEX idx_89776_id_unique ON to_extension USING btree (id);
 +
 +
 +--
 +-- Name: idx_89786_name_unique; Type: INDEX; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON asn FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON cachegroup FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON cachegroup_parameter FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON cdn FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON deliveryservice FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON deliveryservice_server FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON deliveryservice_tmuser FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON division FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON federation FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON federation_deliveryservice FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON federation_federation_resolver FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON federation_resolver FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON federation_tmuser FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON hwinfo FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON job FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON job_agent FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON job_result FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON job_status FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON log FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON parameter FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON phys_location FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON profile FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON profile_parameter FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON regex FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON region FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON server FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON servercheck FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON staticdnsentry FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON status FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON steering_target FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON tm_user FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: to_user
 +--
 +
 +CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON type FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 +
 +
 +--
 +-- Name: fk_agent_id1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_result
 +    ADD CONSTRAINT fk_agent_id1 FOREIGN KEY (agent) REFERENCES job_agent(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_atsprofile_atsparameters_atsparameters1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY profile_parameter
 +    ADD CONSTRAINT fk_atsprofile_atsparameters_atsparameters1 FOREIGN KEY (parameter) REFERENCES parameter(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_atsprofile_atsparameters_atsprofile1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY profile_parameter
 +    ADD CONSTRAINT fk_atsprofile_atsparameters_atsprofile1 FOREIGN KEY (profile) REFERENCES profile(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_cdn1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice
 +    ADD CONSTRAINT fk_cdn1 FOREIGN KEY (cdn_id) REFERENCES cdn(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
 +
 +
 +--
 +-- Name: fk_cdn2; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_cdn2 FOREIGN KEY (cdn_id) REFERENCES cdn(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
 +
 +
 +--
 +-- Name: fk_cg_1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup
 +    ADD CONSTRAINT fk_cg_1 FOREIGN KEY (parent_cachegroup_id) REFERENCES cachegroup(id);
 +
 +
 +--
 +-- Name: fk_cg_param_cachegroup1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup_parameter
 +    ADD CONSTRAINT fk_cg_param_cachegroup1 FOREIGN KEY (cachegroup) REFERENCES cachegroup(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_cg_secondary; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup
 +    ADD CONSTRAINT fk_cg_secondary FOREIGN KEY (secondary_parent_cachegroup_id) REFERENCES cachegroup(id);
 +
 +
 +--
 +-- Name: fk_cg_type1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup
 +    ADD CONSTRAINT fk_cg_type1 FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_contentserver_atsprofile1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_contentserver_atsprofile1 FOREIGN KEY (profile) REFERENCES profile(id);
 +
 +
 +--
 +-- Name: fk_contentserver_contentserverstatus1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_contentserver_contentserverstatus1 FOREIGN KEY (status) REFERENCES status(id);
 +
 +
 +--
 +-- Name: fk_contentserver_contentservertype1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_contentserver_contentservertype1 FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_contentserver_phys_location1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_contentserver_phys_location1 FOREIGN KEY (phys_location) REFERENCES phys_location(id);
 +
 +
 +--
 +-- Name: fk_cran_cachegroup1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY asn
 +    ADD CONSTRAINT fk_cran_cachegroup1 FOREIGN KEY (cachegroup) REFERENCES cachegroup(id);
 +
 +
 +--
 +-- Name: fk_deliveryservice_profile1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice
 +    ADD CONSTRAINT fk_deliveryservice_profile1 FOREIGN KEY (profile) REFERENCES profile(id);
 +
 +
 +--
 +-- Name: fk_deliveryservice_type1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice
 +    ADD CONSTRAINT fk_deliveryservice_type1 FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_ds_to_cs_contentserver1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_server
 +    ADD CONSTRAINT fk_ds_to_cs_contentserver1 FOREIGN KEY (server) REFERENCES server(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_ds_to_cs_deliveryservice1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_server
 +    ADD CONSTRAINT fk_ds_to_cs_deliveryservice1 FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_ds_to_regex_deliveryservice1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_regex
 +    ADD CONSTRAINT fk_ds_to_regex_deliveryservice1 FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_ds_to_regex_regex1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_regex
 +    ADD CONSTRAINT fk_ds_to_regex_regex1 FOREIGN KEY (regex) REFERENCES regex(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_ext_type; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY to_extension
 +    ADD CONSTRAINT fk_ext_type FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_federation_federation_resolver1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_federation_resolver
 +    ADD CONSTRAINT fk_federation_federation_resolver1 FOREIGN KEY (federation) REFERENCES federation(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_mapping_type; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_resolver
 +    ADD CONSTRAINT fk_federation_mapping_type FOREIGN KEY (type) REFERENCES type(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_resolver_to_fed1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_federation_resolver
 +    ADD CONSTRAINT fk_federation_resolver_to_fed1 FOREIGN KEY (federation_resolver) REFERENCES federation_resolver(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_tmuser_federation; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_tmuser
 +    ADD CONSTRAINT fk_federation_tmuser_federation FOREIGN KEY (federation) REFERENCES federation(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_tmuser_role; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_tmuser
 +    ADD CONSTRAINT fk_federation_tmuser_role FOREIGN KEY (role) REFERENCES role(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_tmuser_tmuser; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_tmuser
 +    ADD CONSTRAINT fk_federation_tmuser_tmuser FOREIGN KEY (tm_user) REFERENCES tm_user(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_to_ds1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_deliveryservice
 +    ADD CONSTRAINT fk_federation_to_ds1 FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_federation_to_fed1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY federation_deliveryservice
 +    ADD CONSTRAINT fk_federation_to_fed1 FOREIGN KEY (federation) REFERENCES federation(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_hwinfo1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY hwinfo
 +    ADD CONSTRAINT fk_hwinfo1 FOREIGN KEY (serverid) REFERENCES server(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_job_agent_id1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job
 +    ADD CONSTRAINT fk_job_agent_id1 FOREIGN KEY (agent) REFERENCES job_agent(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_job_deliveryservice1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job
 +    ADD CONSTRAINT fk_job_deliveryservice1 FOREIGN KEY (job_deliveryservice) REFERENCES deliveryservice(id);
 +
 +
 +--
 +-- Name: fk_job_id1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job_result
 +    ADD CONSTRAINT fk_job_id1 FOREIGN KEY (job) REFERENCES job(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_job_status_id1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job
 +    ADD CONSTRAINT fk_job_status_id1 FOREIGN KEY (status) REFERENCES job_status(id);
 +
 +
 +--
 +-- Name: fk_job_user_id1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY job
 +    ADD CONSTRAINT fk_job_user_id1 FOREIGN KEY (job_user) REFERENCES tm_user(id);
 +
 +
 +--
 +-- Name: fk_log_1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY log
 +    ADD CONSTRAINT fk_log_1 FOREIGN KEY (tm_user) REFERENCES tm_user(id);
 +
 +
 +--
 +-- Name: fk_parameter; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY cachegroup_parameter
 +    ADD CONSTRAINT fk_parameter FOREIGN KEY (parameter) REFERENCES parameter(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_phys_location_region; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY phys_location
 +    ADD CONSTRAINT fk_phys_location_region FOREIGN KEY (region) REFERENCES region(id);
 +
 +
 +--
 +-- Name: fk_regex_type1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY regex
 +    ADD CONSTRAINT fk_regex_type1 FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_region_division1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY region
 +    ADD CONSTRAINT fk_region_division1 FOREIGN KEY (division) REFERENCES division(id);
 +
 +
 +--
 +-- Name: fk_server_cachegroup1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY server
 +    ADD CONSTRAINT fk_server_cachegroup1 FOREIGN KEY (cachegroup) REFERENCES cachegroup(id) ON UPDATE RESTRICT ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_serverstatus_server1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY servercheck
 +    ADD CONSTRAINT fk_serverstatus_server1 FOREIGN KEY (server) REFERENCES server(id) ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_staticdnsentry_cachegroup1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY staticdnsentry
 +    ADD CONSTRAINT fk_staticdnsentry_cachegroup1 FOREIGN KEY (cachegroup) REFERENCES cachegroup(id);
 +
 +
 +--
 +-- Name: fk_staticdnsentry_ds; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY staticdnsentry
 +    ADD CONSTRAINT fk_staticdnsentry_ds FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id);
 +
 +
 +--
 +-- Name: fk_staticdnsentry_type; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY staticdnsentry
 +    ADD CONSTRAINT fk_staticdnsentry_type FOREIGN KEY (type) REFERENCES type(id);
 +
 +
 +--
 +-- Name: fk_steering_target_delivery_service; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY steering_target
 +    ADD CONSTRAINT fk_steering_target_delivery_service FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_steering_target_target; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY steering_target
 +    ADD CONSTRAINT fk_steering_target_target FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_tm_user_ds; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_tmuser
 +    ADD CONSTRAINT fk_tm_user_ds FOREIGN KEY (deliveryservice) REFERENCES deliveryservice(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_tm_user_id; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY deliveryservice_tmuser
 +    ADD CONSTRAINT fk_tm_user_id FOREIGN KEY (tm_user_id) REFERENCES tm_user(id) ON UPDATE CASCADE ON DELETE CASCADE;
 +
 +
 +--
 +-- Name: fk_user_1; Type: FK CONSTRAINT; Schema: public; Owner: to_user
 +--
 +
 +ALTER TABLE ONLY tm_user
 +    ADD CONSTRAINT fk_user_1 FOREIGN KEY (role) REFERENCES role(id) ON DELETE SET NULL;
 +
 +
 +--
 +-- Name: public; Type: ACL; Schema: -; Owner: to_user
 +--
 +
 +REVOKE ALL ON SCHEMA public FROM PUBLIC;
 +REVOKE ALL ON SCHEMA public FROM to_user;
 +GRANT ALL ON SCHEMA public TO to_user;
 +GRANT ALL ON SCHEMA public TO PUBLIC;
 +
 +
 +--
 +-- PostgreSQL database dump complete
 +--
  
 --- +goose Up
 --- SQL in section 'Up' is executed when this migration is applied
 --- MySQL dump 10.13  Distrib 5.6.19, for osx10.9 (x86_64)
 ---
 --- Host: localhost    Database: twelve_monkeys
 --- ------------------------------------------------------
 --- Server version	5.6.19
 -
 -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
 -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 -/*!40101 SET NAMES utf8 */;
 -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
 -/*!40103 SET TIME_ZONE='+00:00' */;
 -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
 -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
 -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
 -
 ---
 --- Table structure for table `cran`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `cran` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `asn` int(11) NOT NULL,
 -  `location` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`,`location`),
 -  UNIQUE KEY `cr_id_UNIQUE` (`id`),
 -  KEY `fk_cran_location1` (`location`),
 -  CONSTRAINT `fk_cran_location1` FOREIGN KEY (`location`) REFERENCES `location` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
 -) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `deliveryservice`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `deliveryservice` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `xml_id` varchar(48) NOT NULL,
 -  `active` tinyint(4) NOT NULL,
 -  `dscp` int(11) NOT NULL,
 -  `signed` tinyint(1) DEFAULT NULL,
 -  `qstring_ignore` tinyint(1) DEFAULT NULL,
 -  `geo_limit` tinyint(1) DEFAULT '0',
 -  `http_bypass_fqdn` varchar(255) DEFAULT NULL,
 -  `dns_bypass_ip` varchar(45) DEFAULT NULL,
 -  `dns_bypass_ip6` varchar(45) DEFAULT NULL,
 -  `dns_bypass_ttl` int(11) DEFAULT NULL,
 -  `org_server_fqdn` varchar(255) DEFAULT NULL,
 -  `type` int(11) NOT NULL,
 -  `profile` int(11) NOT NULL,
 -  `ccr_dns_ttl` int(11) DEFAULT NULL,
 -  `global_max_mbps` int(11) DEFAULT NULL,
 -  `global_max_tps` int(11) DEFAULT NULL,
 -  `long_desc` varchar(255) DEFAULT NULL,
 -  `long_desc_1` varchar(255) DEFAULT NULL,
 -  `long_desc_2` varchar(255) DEFAULT NULL,
 -  `max_dns_answers` int(11) DEFAULT '0',
 -  `info_url` varchar(255) DEFAULT NULL,
 -  `miss_lat` double DEFAULT NULL,
 -  `miss_long` double DEFAULT NULL,
 -  `check_path` varchar(255) DEFAULT NULL,
 -  `header_rewrite` int(11) DEFAULT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  `protocol` tinyint(4) DEFAULT '0',
 -  PRIMARY KEY (`id`,`type`),
 -  UNIQUE KEY `ds_name_UNIQUE` (`xml_id`),
 -  UNIQUE KEY `ds_id_UNIQUE` (`id`),
 -  KEY `fk_deliveryservice_type1` (`type`),
 -  KEY `fk_deliveryservice_profile1` (`profile`),
 -  KEY `fk_deliveryservice_header_rewrite1_idx` (`header_rewrite`),
 -  CONSTRAINT `fk_deliveryservice_header_rewrite1` FOREIGN KEY (`header_rewrite`) REFERENCES `header_rewrite` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_deliveryservice_profile1` FOREIGN KEY (`profile`) REFERENCES `profile` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_deliveryservice_type1` FOREIGN KEY (`type`) REFERENCES `type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
 -) ENGINE=InnoDB AUTO_INCREMENT=311 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `deliveryservice_regex`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `deliveryservice_regex` (
 -  `deliveryservice` int(11) NOT NULL,
 -  `regex` int(11) NOT NULL,
 -  `set_number` int(11) DEFAULT '0',
 -  PRIMARY KEY (`deliveryservice`,`regex`),
 -  KEY `fk_ds_to_regex_regex1` (`regex`),
 -  CONSTRAINT `fk_ds_to_regex_deliveryservice1` FOREIGN KEY (`deliveryservice`) REFERENCES `deliveryservice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
 -  CONSTRAINT `fk_ds_to_regex_regex1` FOREIGN KEY (`regex`) REFERENCES `regex` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `deliveryservice_server`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `deliveryservice_server` (
 -  `deliveryservice` int(11) NOT NULL,
 -  `server` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`deliveryservice`,`server`),
 -  KEY `fk_ds_to_cs_contentserver1` (`server`),
 -  CONSTRAINT `fk_ds_to_cs_contentserver1` FOREIGN KEY (`server`) REFERENCES `server` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
 -  CONSTRAINT `fk_ds_to_cs_deliveryservice1` FOREIGN KEY (`deliveryservice`) REFERENCES `deliveryservice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `deliveryservice_tmuser`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `deliveryservice_tmuser` (
 -  `deliveryservice` int(11) NOT NULL,
 -  `tm_user_id` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`deliveryservice`,`tm_user_id`),
 -  KEY `fk_tm_userid` (`tm_user_id`),
 -  CONSTRAINT `fk_tm_user_ds` FOREIGN KEY (`deliveryservice`) REFERENCES `deliveryservice` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
 -  CONSTRAINT `fk_tm_user_id` FOREIGN KEY (`tm_user_id`) REFERENCES `tm_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `division`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `division` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `name` varchar(45) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`),
 -  UNIQUE KEY `name_UNIQUE` (`name`)
 -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `header_rewrite`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `header_rewrite` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `hr_condition` varchar(1024) DEFAULT NULL,
 -  `action` varchar(1024) NOT NULL,
 -  PRIMARY KEY (`id`)
 -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `hwinfo`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `hwinfo` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `serverid` int(11) NOT NULL,
 -  `description` varchar(256) NOT NULL,
 -  `val` varchar(256) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`),
 -  UNIQUE KEY `serverid` (`serverid`,`description`),
 -  KEY `fk_hwinfo1` (`serverid`),
 -  CONSTRAINT `fk_hwinfo1` FOREIGN KEY (`serverid`) REFERENCES `server` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
 -) ENGINE=InnoDB AUTO_INCREMENT=4021555 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `job`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `job` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `agent` int(11) DEFAULT NULL,
 -  `object_type` varchar(48) DEFAULT NULL,
 -  `object_name` varchar(256) DEFAULT NULL,
 -  `keyword` varchar(48) NOT NULL,
 -  `parameters` varchar(256) DEFAULT NULL,
 -  `asset_url` varchar(512) NOT NULL,
 -  `asset_type` varchar(48) NOT NULL,
 -  `status` int(11) NOT NULL,
 -  `start_time` datetime NOT NULL,
 -  `entered_time` datetime NOT NULL,
 -  `job_user` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`),
 -  KEY `fk_job_agent_id1` (`agent`),
 -  KEY `fk_job_status_id1` (`status`),
 -  KEY `fk_job_user_id1` (`job_user`),
 -  CONSTRAINT `fk_job_user_id1` FOREIGN KEY (`job_user`) REFERENCES `tm_user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_job_agent_id1` FOREIGN KEY (`agent`) REFERENCES `job_agent` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_job_status_id1` FOREIGN KEY (`status`) REFERENCES `job_status` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
 -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `job_agent`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `job_agent` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `name` varchar(128) DEFAULT NULL,
 -  `description` varchar(512) DEFAULT NULL,
 -  `active` int(1) NOT NULL DEFAULT '0',
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`)
 -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `job_result`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `job_result` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `job` int(11) NOT NULL,
 -  `agent` int(11) NOT NULL,
 -  `result` varchar(48) NOT NULL,
 -  `description` varchar(512) DEFAULT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`),
 -  KEY `fk_job_id1` (`job`),
 -  KEY `fk_agent_id1` (`agent`),
 -  CONSTRAINT `fk_agent_id1` FOREIGN KEY (`agent`) REFERENCES `job_agent` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_job_id1` FOREIGN KEY (`job`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `job_status`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `job_status` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `name` varchar(48) DEFAULT NULL,
 -  `description` varchar(256) DEFAULT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`)
 -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `location`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `location` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `name` varchar(45) NOT NULL,
 -  `short_name` varchar(255) NOT NULL,
 -  `latitude` double DEFAULT NULL,
 -  `longitude` double DEFAULT NULL,
 -  `parent_location_id` int(11) DEFAULT NULL,
 -  `type` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`id`,`type`),
 -  UNIQUE KEY `loc_name_UNIQUE` (`name`),
 -  UNIQUE KEY `loc_short_UNIQUE` (`short_name`),
 -  UNIQUE KEY `lo_id_UNIQUE` (`id`),
 -  KEY `fk_location_type1` (`type`),
 -  KEY `fk_location_1` (`parent_location_id`),
 -  CONSTRAINT `fk_location_1` FOREIGN KEY (`parent_location_id`) REFERENCES `location` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_location_type1` FOREIGN KEY (`type`) REFERENCES `type` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
 -) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `location_parameter`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `location_parameter` (
 -  `location` int(11) NOT NULL,
 -  `parameter` int(11) NOT NULL,
 -  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 -  PRIMARY KEY (`location`,`parameter`),
 -  KEY `fk_location` (`location`),
 -  KEY `fk_parameter` (`parameter`),
 -  CONSTRAINT `fk_location` FOREIGN KEY (`location`) REFERENCES `location` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
 -  CONSTRAINT `fk_parameter` FOREIGN KEY (`parameter`) REFERENCES `parameter` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
 -) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 -/*!40101 SET character_set_client = @saved_cs_client */;
 -
 ---
 --- Table structure for table `log`
 ---
 -
 -/*!40101 SET @saved_cs_client     = @@character_set_client */;
 -/*!40101 SET character_set_client = utf8 */;
 -CREATE TABLE `log` (
 -  `id` int(11) NOT NULL AUTO_INCREMENT,
 -  `level` varchar(45) DEFAULT NULL,
 -  `message` varchar(1024) NOT NULL,
 -  `tm_user` int(11) NOT NULL,
 -  `ticketnum` varchar(64) DEFAULT NULL,
 -  `

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f13fb5cb/traffic_ops/app/t/api/1.2/parameter.t
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/f13fb5cb/traffic_ops/app/t_integration/extensions.t
----------------------------------------------------------------------