[Rt-commit] rt branch, master, updated. rt-4.2.12-447-g0a2cde2

Shawn Moore shawn at bestpractical.com
Mon Nov 2 11:25:56 EST 2015


The branch, master has been updated
       via  0a2cde28d924a366a77f76d1803908d6b1202d1a (commit)
      from  25bf408df23a927abe81ed56f7ca82385475d51b (commit)

Summary of changes:
 etc/upgrade/4.3.0/schema.Oracle            |  1 -
 etc/upgrade/4.3.0/schema.Pg                |  1 -
 etc/upgrade/4.3.0/schema.mysql             |  1 -
 etc/upgrade/4.3.10/content                 | 38 ------------------------------
 etc/upgrade/{4.3.10 => 4.3.11}/content     | 33 --------------------------
 etc/upgrade/4.3.11/schema.Oracle           |  1 -
 etc/upgrade/4.3.11/schema.Pg               |  1 -
 etc/upgrade/4.3.11/schema.mysql            |  1 -
 etc/upgrade/4.3.13/schema.Oracle           |  9 ++++++-
 etc/upgrade/4.3.13/schema.Pg               | 10 +++++++-
 etc/upgrade/4.3.13/schema.mysql            | 10 +++++++-
 etc/upgrade/{4.3.0 => 4.3.3}/schema.SQLite |  0
 etc/upgrade/{4.3.6 => 4.3.4}/schema.Oracle |  0
 etc/upgrade/{4.3.6 => 4.3.4}/schema.Pg     |  0
 etc/upgrade/{4.3.6 => 4.3.4}/schema.SQLite |  0
 etc/upgrade/{4.3.6 => 4.3.4}/schema.mysql  |  0
 etc/upgrade/4.3.5/schema.Oracle            |  1 -
 etc/upgrade/4.3.5/schema.Pg                |  1 -
 etc/upgrade/4.3.5/schema.mysql             |  1 -
 19 files changed, 26 insertions(+), 83 deletions(-)
 delete mode 100644 etc/upgrade/4.3.0/schema.Oracle
 delete mode 100644 etc/upgrade/4.3.0/schema.Pg
 delete mode 100644 etc/upgrade/4.3.0/schema.mysql
 copy etc/upgrade/{4.3.10 => 4.3.11}/content (58%)
 delete mode 100644 etc/upgrade/4.3.11/schema.Oracle
 delete mode 100644 etc/upgrade/4.3.11/schema.Pg
 delete mode 100644 etc/upgrade/4.3.11/schema.mysql
 rename etc/upgrade/{4.3.0 => 4.3.3}/schema.SQLite (100%)
 rename etc/upgrade/{4.3.6 => 4.3.4}/schema.Oracle (100%)
 rename etc/upgrade/{4.3.6 => 4.3.4}/schema.Pg (100%)
 rename etc/upgrade/{4.3.6 => 4.3.4}/schema.SQLite (100%)
 rename etc/upgrade/{4.3.6 => 4.3.4}/schema.mysql (100%)
 delete mode 100644 etc/upgrade/4.3.5/schema.Oracle
 delete mode 100644 etc/upgrade/4.3.5/schema.Pg
 delete mode 100644 etc/upgrade/4.3.5/schema.mysql

- Log -----------------------------------------------------------------
commit 0a2cde28d924a366a77f76d1803908d6b1202d1a
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Nov 2 11:24:25 2015 -0500

    Reorganize our upgrade steps
    
        Each upgrade step should do one and only one thing.
        We were missing a 4.3.4.
        Save most of the drop columns for the last step 4.3.13
        Note why 4.3.3 schema.SQLite is important (no drop column)

diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.0/schema.Oracle
deleted file mode 100644
index d905690..0000000
--- a/etc/upgrade/4.3.0/schema.Oracle
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Principals DROP COLUMN ObjectId;
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.0/schema.Pg
deleted file mode 100644
index d905690..0000000
--- a/etc/upgrade/4.3.0/schema.Pg
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Principals DROP COLUMN ObjectId;
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.0/schema.mysql
deleted file mode 100644
index d905690..0000000
--- a/etc/upgrade/4.3.0/schema.mysql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Principals DROP COLUMN ObjectId;
diff --git a/etc/upgrade/4.3.10/content b/etc/upgrade/4.3.10/content
index d760ae4..2c8013f 100644
--- a/etc/upgrade/4.3.10/content
+++ b/etc/upgrade/4.3.10/content
@@ -1,44 +1,6 @@
 use strict;
 use warnings;
 
-our @Initial = (
-    sub {
-        $RT::Logger->info("Going to migrate dashboard subscriptions");
-
-        my $attrs = RT::Attributes->new( RT->SystemUser );
-        $attrs->Limit( FIELD => 'ObjectType', VALUE => 'RT::User' );
-        $attrs->Limit( FIELD => 'Name', VALUE => 'Subscription' );
-
-        while ( my $attr = $attrs->Next ) {
-            my %fields;
-            my $frequency = $attr->SubValue('Frequency');
-
-            if ($frequency eq 'daily') {
-                for my $day (qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday/) {
-                    $fields{$day} = 1;
-                }
-            }
-            elsif ($frequency eq 'm-f') {
-                $fields{Frequency} = 'daily';
-                for my $day (qw/Monday Tuesday Wednesday Thursday Friday/) {
-                    $fields{$day} = 1;
-                }
-                $fields{Saturday} = $fields{Sunday} = 0;
-            }
-            else {
-                next;
-            }
-
-            my ($ok, $msg) = $attr->SetSubValues(%fields);
-
-            if (!$ok) {
-                $RT::Logger->error("Couldn't update subscription $msg");
-            }
-        }
-        return 1;
-    },
-);
-
 require RT::Asset;
 
 our @Catalogs;
diff --git a/etc/upgrade/4.3.10/content b/etc/upgrade/4.3.11/content
similarity index 58%
copy from etc/upgrade/4.3.10/content
copy to etc/upgrade/4.3.11/content
index d760ae4..8502f00 100644
--- a/etc/upgrade/4.3.10/content
+++ b/etc/upgrade/4.3.11/content
@@ -39,36 +39,3 @@ our @Initial = (
     },
 );
 
-require RT::Asset;
-
-our @Catalogs;
-
- at Catalogs = ({
-    Name        => "General assets",      # loc
-    Description => "The default catalog", # loc
-});
-
-our @Final;
-
-# Create global role groups
-push @Final, sub {
-    foreach my $type (RT::Asset->Roles) {
-        next if $type eq "Owner";   # There's a core global role group for Owner
-
-        my $group = RT->System->RoleGroup( $type );
-        if ( $group->id ) {
-            RT->Logger->debug("Assets role '$type' already exists.");
-            next;
-        }
-
-        $group = RT::Group->new( RT->SystemUser );
-        my ($ok, $msg) = $group->CreateRoleGroup(
-            Object              => RT->System,
-            Name                => $type,
-            InsideTransaction   => 0,
-        );
-        RT->Logger->error("Couldn't create global asset role group '$type': $msg")
-            unless $ok;
-    }
-};
-
diff --git a/etc/upgrade/4.3.11/schema.Oracle b/etc/upgrade/4.3.11/schema.Oracle
deleted file mode 100644
index 00d424c..0000000
--- a/etc/upgrade/4.3.11/schema.Oracle
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Groups DROP COLUMN Type;
diff --git a/etc/upgrade/4.3.11/schema.Pg b/etc/upgrade/4.3.11/schema.Pg
deleted file mode 100644
index 00d424c..0000000
--- a/etc/upgrade/4.3.11/schema.Pg
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Groups DROP COLUMN Type;
diff --git a/etc/upgrade/4.3.11/schema.mysql b/etc/upgrade/4.3.11/schema.mysql
deleted file mode 100644
index 00d424c..0000000
--- a/etc/upgrade/4.3.11/schema.mysql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Groups DROP COLUMN Type;
diff --git a/etc/upgrade/4.3.13/schema.Oracle b/etc/upgrade/4.3.13/schema.Oracle
index 4f31a35..785ee7d 100644
--- a/etc/upgrade/4.3.13/schema.Oracle
+++ b/etc/upgrade/4.3.13/schema.Oracle
@@ -1,7 +1,14 @@
 ALTER TABLE Tickets
-  DROP (IssueStatement, Resolution);
+  DROP (IssueStatement, Resolution, Disabled);
 
 ALTER TABLE Users
   DROP (EmailEncoding, WebEncoding,
         ExternalContactInfoId, ContactInfoSystem, ExternalAuthId, AuthSystem,
         PGPKey);
+
+ALTER TABLE Principals
+  DROP (ObjectId);
+
+ALTER TABLE Groups
+  DROP (Type);
+
diff --git a/etc/upgrade/4.3.13/schema.Pg b/etc/upgrade/4.3.13/schema.Pg
index ef2c27f..eeb568c 100644
--- a/etc/upgrade/4.3.13/schema.Pg
+++ b/etc/upgrade/4.3.13/schema.Pg
@@ -1,6 +1,7 @@
 ALTER TABLE Tickets
   DROP COLUMN IssueStatement,
-  DROP COLUMN Resolution;
+  DROP COLUMN Resolution,
+  DROP COLUMN Disabled;
 
 ALTER TABLE Users
   DROP COLUMN EmailEncoding,
@@ -10,3 +11,10 @@ ALTER TABLE Users
   DROP COLUMN ExternalAuthId,
   DROP COLUMN AuthSystem,
   DROP COLUMN PGPKey;
+
+ALTER TABLE Principals
+  DROP COLUMN ObjectId;
+
+ALTER TABLE Groups
+  DROP COLUMN Type;
+
diff --git a/etc/upgrade/4.3.13/schema.mysql b/etc/upgrade/4.3.13/schema.mysql
index ef2c27f..31328a0 100644
--- a/etc/upgrade/4.3.13/schema.mysql
+++ b/etc/upgrade/4.3.13/schema.mysql
@@ -1,6 +1,7 @@
 ALTER TABLE Tickets
   DROP COLUMN IssueStatement,
-  DROP COLUMN Resolution;
+  DROP COLUMN Resolution,
+  DROP COLUMN Disabled;
 
 ALTER TABLE Users
   DROP COLUMN EmailEncoding,
@@ -10,3 +11,10 @@ ALTER TABLE Users
   DROP COLUMN ExternalAuthId,
   DROP COLUMN AuthSystem,
   DROP COLUMN PGPKey;
+
+ALTER TABLE Principals
+  DROP COLUMN ObjectId;
+
+ALTER TABLE Groups
+   DROP COLUMN Type;
+
diff --git a/etc/upgrade/4.3.0/schema.SQLite b/etc/upgrade/4.3.3/schema.SQLite
similarity index 100%
rename from etc/upgrade/4.3.0/schema.SQLite
rename to etc/upgrade/4.3.3/schema.SQLite
diff --git a/etc/upgrade/4.3.6/schema.Oracle b/etc/upgrade/4.3.4/schema.Oracle
similarity index 100%
rename from etc/upgrade/4.3.6/schema.Oracle
rename to etc/upgrade/4.3.4/schema.Oracle
diff --git a/etc/upgrade/4.3.6/schema.Pg b/etc/upgrade/4.3.4/schema.Pg
similarity index 100%
rename from etc/upgrade/4.3.6/schema.Pg
rename to etc/upgrade/4.3.4/schema.Pg
diff --git a/etc/upgrade/4.3.6/schema.SQLite b/etc/upgrade/4.3.4/schema.SQLite
similarity index 100%
rename from etc/upgrade/4.3.6/schema.SQLite
rename to etc/upgrade/4.3.4/schema.SQLite
diff --git a/etc/upgrade/4.3.6/schema.mysql b/etc/upgrade/4.3.4/schema.mysql
similarity index 100%
rename from etc/upgrade/4.3.6/schema.mysql
rename to etc/upgrade/4.3.4/schema.mysql
diff --git a/etc/upgrade/4.3.5/schema.Oracle b/etc/upgrade/4.3.5/schema.Oracle
deleted file mode 100644
index cf01202..0000000
--- a/etc/upgrade/4.3.5/schema.Oracle
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Tickets DROP COLUMN Disabled;
diff --git a/etc/upgrade/4.3.5/schema.Pg b/etc/upgrade/4.3.5/schema.Pg
deleted file mode 100644
index cf01202..0000000
--- a/etc/upgrade/4.3.5/schema.Pg
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Tickets DROP COLUMN Disabled;
diff --git a/etc/upgrade/4.3.5/schema.mysql b/etc/upgrade/4.3.5/schema.mysql
deleted file mode 100644
index cf01202..0000000
--- a/etc/upgrade/4.3.5/schema.mysql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE Tickets DROP COLUMN Disabled;

-----------------------------------------------------------------------


More information about the rt-commit mailing list