[Rt-commit] rt branch, 4.4/drop-unused-columns, repushed

Shawn Moore shawn at bestpractical.com
Fri May 15 18:53:32 EDT 2015


The branch 4.4/drop-unused-columns was deleted and repushed:
       was e43f3de0d28506334d8ce35a660b8dc85b3e73e1
       now b3787fdbd51ace83f37122cb246decf53369b180

1:  eb29b20 = 1:  eb29b20 Resolution and IssueStatement have never been used in core RT; drop them
2:  26986e3 = 2:  26986e3 EmailEncoding and WebEncoding have never been used in core RT
3:  8db7c75 = 3:  8db7c75 Drop all "external contact" columns from users
4:  e5f8c8e = 4:  e5f8c8e Drop never-used PGPKey column on users
6:  b527eb9 ! 5:  e60f391 Add a "begin" upgrade step for validation
    @@ -35,6 +35,19 @@
          my %upgrade_data = (
     @@
      
    +     RT->System->AddUpgradeHistory($package => \%upgrade_data);
    + 
    +-    my $db_type = RT->Config->Get('DatabaseType');
    +-    $RT::Handle->Disconnect() unless $db_type eq 'SQLite';
    ++    if (!$args{begin_step}) {
    ++        my $db_type = RT->Config->Get('DatabaseType');
    ++        $RT::Handle->Disconnect() unless $db_type eq 'SQLite';
    ++    }
    + 
    +     return @ret;
    + }
    +@@
    + 
              my %tmp = (%args, datadir => "$base_dir/$v", datafile => undef, backcompat => \@back);
      
     +        if ( -e "$base_dir/$v/begin" ) {
5:  04ffee6 ! 6:  b3787fd Bail out if a column we'll drop has any values
    @@ -5,10 +5,10 @@
             The last thing I want is an angry email saying we dropped a
             column filled with irreplaceable data
     
    -diff --git a/etc/upgrade/4.3.0/content b/etc/upgrade/4.3.0/content
    +diff --git a/etc/upgrade/4.3.0/begin b/etc/upgrade/4.3.0/begin
     new file mode 100644
     --- /dev/null
    -+++ b/etc/upgrade/4.3.0/content
    ++++ b/etc/upgrade/4.3.0/begin
     @@
     +use strict;
     +use warnings;
    @@ -34,7 +34,7 @@
     +            );
     +
     +            if ($tickets->Count) {
    -+                die "You have " . $tickets->Count . " ticket(s) with a non-empty value for column '$column'. Core RT does not use this column, so perhaps an extension or local modification makes use of it. Please migrate these ticket values to a custom field or an attribute.";
    ++                die "You have " . $tickets->Count . " ticket(s) with a non-zero value for column '$column'. Core RT does not use this column, so perhaps an extension or local modification makes use of it. Please migrate these ticket values to a custom field or an attribute.";
     +            }
     +        }
     +
    @@ -64,4 +64,3 @@
     +    },
     +);
     +
    -
7:  835e1d8 < -:  ------- Move the 4.3.0 validation from after to before schema change
8:  614d331 < -:  ------- Unexpected ticket values are non-zero, not non-empty
9:  e43f3de < -:  ------- Don't disconnect after begin step



More information about the rt-commit mailing list