Reverese schema update

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

Branch: refs/heads/master
Commit: 05798ae1a2c46e1a0355888b0fa1fcf55b49d7cf
Parents: a6cc756
Author: Jan van Doorn <jan_vando...@cable.comcast.com>
Authored: Sat Dec 31 13:58:55 2016 -0700
Committer: Jan van Doorn <j...@apache.org>
Committed: Fri Feb 17 17:49:10 2017 +0000

----------------------------------------------------------------------
 traffic_ops/app/db/ats_6_mso_migrate.pl         |  2 +-
 .../app/lib/Schema/Result/Deliveryservice.pm    | 23 ++++++++++++--------
 traffic_ops/app/lib/Schema/Result/Profile.pm    | 23 ++++++++++++++++----
 3 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/05798ae1/traffic_ops/app/db/ats_6_mso_migrate.pl
----------------------------------------------------------------------
diff --git a/traffic_ops/app/db/ats_6_mso_migrate.pl 
b/traffic_ops/app/db/ats_6_mso_migrate.pl
index e76810b..6315b8c 100755
--- a/traffic_ops/app/db/ats_6_mso_migrate.pl
+++ b/traffic_ops/app/db/ats_6_mso_migrate.pl
@@ -64,7 +64,7 @@ while ( my @data = $sth->fetchrow_array() ) {
                                my ( $name, $value ) = split( /\s+/, $setting );
                                # print $name . " -> " . $value . "\n";
                                my $insh = $dbh->prepare('INSERT INTO PARAMETER 
("name", "config_file", "value") VALUES (?, ?, ?);');
-                               $insh->bind_param( 1, $name );
+                               $insh->bind_param( 1, 'mso.'.$name );
                                $insh->bind_param( 2, 'parent.config' );
                                $insh->bind_param( 3, $value );
                                $insh->execute();

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/05798ae1/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm 
b/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
index 27d48a0..8f81857 100644
--- a/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
+++ b/traffic_ops/app/lib/Schema/Result/Deliveryservice.pm
@@ -98,7 +98,7 @@ __PACKAGE__->table("deliveryservice");
 
   data_type: 'bigint'
   is_foreign_key: 1
-  is_nullable: 0
+  is_nullable: 1
 
 =head2 cdn_id
 
@@ -323,7 +323,7 @@ __PACKAGE__->add_columns(
   "type",
   { data_type => "bigint", is_foreign_key => 1, is_nullable => 0 },
   "profile",
-  { data_type => "bigint", is_foreign_key => 1, is_nullable => 0 },
+  { data_type => "bigint", is_foreign_key => 1, is_nullable => 1 },
   "cdn_id",
   { data_type => "bigint", is_foreign_key => 1, is_nullable => 0 },
   "ccr_dns_ttl",
@@ -417,7 +417,7 @@ __PACKAGE__->set_primary_key("id", "type");
 
 =head1 UNIQUE CONSTRAINTS
 
-=head2 C<idx_18221_ds_id_unique>
+=head2 C<idx_90606_ds_id_unique>
 
 =over 4
 
@@ -427,9 +427,9 @@ __PACKAGE__->set_primary_key("id", "type");
 
 =cut
 
-__PACKAGE__->add_unique_constraint("idx_18221_ds_id_unique", ["id"]);
+__PACKAGE__->add_unique_constraint("idx_90606_ds_id_unique", ["id"]);
 
-=head2 C<idx_18221_ds_name_unique>
+=head2 C<idx_90606_ds_name_unique>
 
 =over 4
 
@@ -439,7 +439,7 @@ 
__PACKAGE__->add_unique_constraint("idx_18221_ds_id_unique", ["id"]);
 
 =cut
 
-__PACKAGE__->add_unique_constraint("idx_18221_ds_name_unique", ["xml_id"]);
+__PACKAGE__->add_unique_constraint("idx_90606_ds_name_unique", ["xml_id"]);
 
 =head1 RELATIONS
 
@@ -545,7 +545,12 @@ __PACKAGE__->belongs_to(
   "profile",
   "Schema::Result::Profile",
   { id => "profile" },
-  { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
+  {
+    is_deferrable => 0,
+    join_type     => "LEFT",
+    on_delete     => "NO ACTION",
+    on_update     => "NO ACTION",
+  },
 );
 
 =head2 staticdnsentries
@@ -609,8 +614,8 @@ __PACKAGE__->belongs_to(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2016-12-26 10:44:56
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+HFlbMehDLwkF/hmfifkjw
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2016-12-31 13:55:06
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+2cW0kP4B6YbySGBBtDp0Q
 
 # You can replace this text with custom code or comments, and it will be 
preserved on regeneration
 #

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/05798ae1/traffic_ops/app/lib/Schema/Result/Profile.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Schema/Result/Profile.pm 
b/traffic_ops/app/lib/Schema/Result/Profile.pm
index 2839364..f7ccd98 100644
--- a/traffic_ops/app/lib/Schema/Result/Profile.pm
+++ b/traffic_ops/app/lib/Schema/Result/Profile.pm
@@ -47,6 +47,12 @@ __PACKAGE__->table("profile");
   is_nullable: 1
   original: {default_value => \"now()"}
 
+=head2 type
+
+  data_type: 'enum'
+  extra: {custom_type_name => "profile_type",list => 
["SERVER_PROFILE","DS_PROFILE"]}
+  is_nullable: 0
+
 =head2 cdn
 
   data_type: 'bigint'
@@ -74,6 +80,15 @@ __PACKAGE__->add_columns(
     is_nullable   => 1,
     original      => { default_value => \"now()" },
   },
+  "type",
+  {
+    data_type => "enum",
+    extra => {
+      custom_type_name => "profile_type",
+      list => ["SERVER_PROFILE", "DS_PROFILE"],
+    },
+    is_nullable => 0,
+  },
   "cdn",
   { data_type => "bigint", is_foreign_key => 1, is_nullable => 1 },
 );
@@ -92,7 +107,7 @@ __PACKAGE__->set_primary_key("id");
 
 =head1 UNIQUE CONSTRAINTS
 
-=head2 C<idx_18384_name_unique>
+=head2 C<idx_90769_name_unique>
 
 =over 4
 
@@ -102,7 +117,7 @@ __PACKAGE__->set_primary_key("id");
 
 =cut
 
-__PACKAGE__->add_unique_constraint("idx_18384_name_unique", ["name"]);
+__PACKAGE__->add_unique_constraint("idx_90769_name_unique", ["name"]);
 
 =head1 RELATIONS
 
@@ -172,8 +187,8 @@ __PACKAGE__->has_many(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2016-12-26 14:46:31
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:osx+OzuftRlkWwKwb1N+hg
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2016-12-31 13:55:06
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NyNmb9qs7HXNZ13aV1VvuQ
 
 
 # You can replace this text with custom code or comments, and it will be 
preserved on regeneration

Reply via email to