[Rt-commit] rt branch, 4.4/drop-unused-columns, repushed
Shawn Moore
shawn at bestpractical.com
Wed Oct 28 17:28:39 EDT 2015
The branch 4.4/drop-unused-columns was deleted and repushed:
was 7c55d5e9b027cfcca527d8603853489e276718f5
now 0cced45f43064272e16293339f6d139d30525b9a
1: eb29b20 = 1: e8a70b0 Resolution and IssueStatement have never been used in core RT; drop them
2: 26986e3 ! 2: df11ddf EmailEncoding and WebEncoding have never been used in core RT
@@ -110,9 +110,9 @@
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@
- RealName => { public => 1 },
- NickName => { public => 1 },
- Lang => { public => 1 },
+ RealName => { public => 1 }, # loc_left_pair
+ NickName => { public => 1 }, # loc_left_pair
+ Lang => { public => 1 }, # loc_left_pair
- EmailEncoding => { public => 1 },
- WebEncoding => { public => 1 },
ExternalContactInfoId => { public => 1, admin => 1 },
@@ -186,23 +186,40 @@
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@
- RealName => $ARGS{'RealName'},
- NickName => $ARGS{'NickName'},
- Lang => $ARGS{'Lang'},
-- EmailEncoding => $ARGS{'EmailEncoding'},
-- WebEncoding => $ARGS{'WebEncoding'},
- ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
- ContactInfoSystem => $ARGS{'ContactInfoSystem'},
- Gecos => $ARGS{'Gecos'},
-@@
- if ($UserObj->Id && $id ne 'new') {
-
- my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
-- Organization RealName NickName Lang EmailEncoding WebEncoding
-+ Organization RealName NickName Lang
- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country
+ delete $ARGS{Disabled} unless $ARGS{SetEnabled};
+
+ my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
+- Organization RealName NickName Lang EmailEncoding WebEncoding
++ Organization RealName NickName Lang
+ ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
+ AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
+ Address2 City State Zip Country
+
+diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
+--- a/share/html/Admin/Users/index.html
++++ b/share/html/Admin/Users/index.html
+@@
+ );
+
+ my @attrs = sort { $sorted{$a} <=> $sorted{$b} }
+- grep { !/(?:^id$|ContactInfo|Encoding|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
++ grep { !/(?:^id$|ContactInfo|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
+ RT::User->ReadableAttributes;
+ my @fields;
+
+
+diff --git a/share/html/Prefs/AboutMe.html b/share/html/Prefs/AboutMe.html
+--- a/share/html/Prefs/AboutMe.html
++++ b/share/html/Prefs/AboutMe.html
+@@
+ else {
+ my @fields = qw(
+ Name Comments Signature EmailAddress FreeformContactInfo
+- Organization RealName NickName Lang EmailEncoding WebEncoding
++ Organization RealName NickName Lang
+ ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
+ AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
+ Address2 City State Zip Country Timezone
@@
$Enabled => undef
$SetEnabled => undef
@@ -213,53 +230,18 @@
$ContactInfoSystem => undef
$Gecos => undef
-diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
---- a/share/html/Admin/Users/index.html
-+++ b/share/html/Admin/Users/index.html
-@@
- );
-
- my @attrs = sort { $sorted{$a} <=> $sorted{$b} }
-- grep { !/(?:^id$|ContactInfo|Encoding|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
-+ grep { !/(?:^id$|ContactInfo|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
- RT::User->ReadableAttributes;
- my @fields;
-
-
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@
- my $user = RT::User->new($session{CurrentUser});
- my @fields = qw(RealName NickName Gecos Organization Address1 Address2 City
- State Zip Country HomePhone WorkPhone MobilePhone PagerPhone
-- FreeformContactInfo Comments Signature Lang EmailEncoding
-- WebEncoding ExternalContactInfoId ContactInfoSystem
-+ FreeformContactInfo Comments Signature Lang
-+ ExternalContactInfoId ContactInfoSystem
- ExternalAuthId AuthSystem Privileged Disabled);
- my %fields = map { lc $_ => $_ } @fields;
-
-
-diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
---- a/share/html/User/Prefs.html
-+++ b/share/html/User/Prefs.html
-@@
- else {
- my @fields = qw(
- Name Comments Signature EmailAddress FreeformContactInfo
-- Organization RealName NickName Lang EmailEncoding WebEncoding
-+ Organization RealName NickName Lang
- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country Timezone
-@@
- $Enabled => undef
- $SetEnabled => undef
- $Lang => undef
--$EmailEncoding => undef
--$WebEncoding => undef
- $ExternalContactInfoId => undef
- $ContactInfoSystem => undef
- $Gecos => undef
-
+ my @fields =
+ qw(Name EmailAddress RealName NickName Gecos Organization Address1
+ Address2 City State Zip Country HomePhone WorkPhone MobilePhone PagerPhone
+- FreeformContactInfo Comments Signature Lang EmailEncoding
+- WebEncoding ExternalContactInfoId ContactInfoSystem
++ FreeformContactInfo Comments Signature Lang
++ ExternalContactInfoId ContactInfoSystem
+ ExternalAuthId AuthSystem Privileged Disabled);
+
+ if ( $fields && %$fields ) {
+
3: 8db7c75 ! 3: a9762ef Drop all "external contact" columns from users
@@ -120,16 +120,16 @@
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@
- RealName => { public => 1 },
- NickName => { public => 1 },
- Lang => { public => 1 },
+ RealName => { public => 1 }, # loc_left_pair
+ NickName => { public => 1 }, # loc_left_pair
+ Lang => { public => 1 }, # loc_left_pair
- ExternalContactInfoId => { public => 1, admin => 1 },
- ContactInfoSystem => { public => 1, admin => 1 },
- ExternalAuthId => { public => 1, admin => 1 },
- AuthSystem => { public => 1, admin => 1 },
- Gecos => { public => 1, admin => 1 },
- PGPKey => { public => 1, admin => 1 },
- SMIMECertificate => { public => 1, admin => 1 },
+ Gecos => { public => 1, admin => 1 }, # loc_left_pair
+ PGPKey => { public => 1, admin => 1 }, # loc_left_pair
+ SMIMECertificate => { public => 1, admin => 1 }, # loc_left_pair
@@
varchar(120) 'RealName'.
varchar(16) 'NickName'.
@@ -240,29 +240,49 @@
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@
- RealName => $ARGS{'RealName'},
- NickName => $ARGS{'NickName'},
- Lang => $ARGS{'Lang'},
-- ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
-- ContactInfoSystem => $ARGS{'ContactInfoSystem'},
- Gecos => $ARGS{'Gecos'},
-- ExternalAuthId => $ARGS{'ExternalAuthId'},
-- AuthSystem => $ARGS{'AuthSystem'},
- HomePhone => $ARGS{'HomePhone'},
- WorkPhone => $ARGS{'WorkPhone'},
- MobilePhone => $ARGS{'MobilePhone'},
-@@
- if ($UserObj->Id && $id ne 'new') {
-
- my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
-- Organization RealName NickName Lang
-- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
-- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
-+ Organization RealName NickName Lang Gecos
-+ HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country
- );
-
+ delete $ARGS{Disabled} unless $ARGS{SetEnabled};
+
+ my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
+- Organization RealName NickName Lang
+- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
+- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
+- Address2 City State Zip Country
++ Organization RealName NickName Lang Gecos HomePhone WorkPhone
++ MobilePhone PagerPhone Address1 Address2 City State Zip Country
+ );
+
+ if ($Create) {
+
+diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
+--- a/share/html/Admin/Users/index.html
++++ b/share/html/Admin/Users/index.html
+@@
+ );
+
+ my @attrs = sort { $sorted{$a} <=> $sorted{$b} }
+- grep { !/(?:^id$|ContactInfo|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
++ grep { !/(?:^id$|ContactInfo|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
+ RT::User->ReadableAttributes;
+ my @fields;
+
+
+diff --git a/share/html/Prefs/AboutMe.html b/share/html/Prefs/AboutMe.html
+--- a/share/html/Prefs/AboutMe.html
++++ b/share/html/Prefs/AboutMe.html
+@@
+ else {
+ my @fields = qw(
+ Name Comments Signature EmailAddress FreeformContactInfo
+- Organization RealName NickName Lang
+- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
+- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
+- Address2 City State Zip Country Timezone
++ Organization RealName NickName Lang Gecos HomePhone WorkPhone
++ MobilePhone PagerPhone Address1 Address2 City State Zip Country
++ Timezone
+ );
+
+ $m->callback(
@@
$Enabled => undef
$SetEnabled => undef
@@ -276,56 +296,18 @@
$WorkPhone => undef
$MobilePhone => undef
-diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
---- a/share/html/Admin/Users/index.html
-+++ b/share/html/Admin/Users/index.html
-@@
- );
-
- my @attrs = sort { $sorted{$a} <=> $sorted{$b} }
-- grep { !/(?:^id$|ContactInfo|^External|System|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
-+ grep { !/(?:^id$|ContactInfo|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
- RT::User->ReadableAttributes;
- my @fields;
-
-
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@
- my @fields = qw(RealName NickName Gecos Organization Address1 Address2 City
- State Zip Country HomePhone WorkPhone MobilePhone PagerPhone
- FreeformContactInfo Comments Signature Lang
-- ExternalContactInfoId ContactInfoSystem
-- ExternalAuthId AuthSystem Privileged Disabled);
-+ Privileged Disabled);
- my %fields = map { lc $_ => $_ } @fields;
-
- if ($id ne 'new') {
-
-diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
---- a/share/html/User/Prefs.html
-+++ b/share/html/User/Prefs.html
-@@
- my @fields = qw(
- Name Comments Signature EmailAddress FreeformContactInfo
- Organization RealName NickName Lang
-- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
-- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
-+ HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country Timezone
- );
-
-@@
- $Enabled => undef
- $SetEnabled => undef
- $Lang => undef
--$ExternalContactInfoId => undef
--$ContactInfoSystem => undef
- $Gecos => undef
--$ExternalAuthId => undef
--$AuthSystem => undef
- $HomePhone => undef
- $WorkPhone => undef
- $MobilePhone => undef
-
+ my @fields =
+ qw(Name EmailAddress RealName NickName Gecos Organization Address1
+ Address2 City State Zip Country HomePhone WorkPhone MobilePhone PagerPhone
+- FreeformContactInfo Comments Signature Lang
+- ExternalContactInfoId ContactInfoSystem
+- ExternalAuthId AuthSystem Privileged Disabled);
++ FreeformContactInfo Comments Signature Lang Privileged Disabled);
+
+ if ( $fields && %$fields ) {
+ @fields = grep { exists $fields->{ lc $_ } } @fields;
+
4: e5f8c8e ! 4: 87c0e8d Drop never-used PGPKey column on users
@@ -104,13 +104,13 @@
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@
- NickName => { public => 1 },
- Lang => { public => 1 },
- Gecos => { public => 1, admin => 1 },
-- PGPKey => { public => 1, admin => 1 },
- SMIMECertificate => { public => 1, admin => 1 },
- PrivateKey => { admin => 1 },
- City => { public => 1 },
+ NickName => { public => 1 }, # loc_left_pair
+ Lang => { public => 1 }, # loc_left_pair
+ Gecos => { public => 1, admin => 1 }, # loc_left_pair
+- PGPKey => { public => 1, admin => 1 }, # loc_left_pair
+ SMIMECertificate => { public => 1, admin => 1 }, # loc_left_pair
+ City => { public => 1 }, # loc_left_pair
+ Country => { public => 1 }, # loc_left_pair
@@
varchar(16) 'Zip'.
varchar(50) 'Country'.
5: 7c55d5e ! 5: 0cced45 Bail out if a column we'll drop has any values
@@ -5,7 +5,7 @@
The last thing I want is an angry email saying we dropped a
column filled with irreplaceable data.
- Moves the schema changes to be 4.3.1 since "content" would run after
+ Moves the schema changes to be 4.3.12 since "content" would run after
drop columns, making the validation too little too late.
diff --git a/etc/upgrade/4.3.0/content b/etc/upgrade/4.3.0/content
@@ -124,10 +124,10 @@
- DROP COLUMN AuthSystem,
- DROP COLUMN PGPKey;
-diff --git a/etc/upgrade/4.3.1/schema.Oracle b/etc/upgrade/4.3.1/schema.Oracle
+diff --git a/etc/upgrade/4.3.12/schema.Oracle b/etc/upgrade/4.3.12/schema.Oracle
new file mode 100644
--- /dev/null
-+++ b/etc/upgrade/4.3.1/schema.Oracle
++++ b/etc/upgrade/4.3.12/schema.Oracle
@@
+ALTER TABLE Tickets
+ DROP (IssueStatement, Resolution);
@@ -137,10 +137,10 @@
+ ExternalContactInfoId, ContactInfoSystem, ExternalAuthId, AuthSystem,
+ PGPKey);
-diff --git a/etc/upgrade/4.3.1/schema.Pg b/etc/upgrade/4.3.1/schema.Pg
+diff --git a/etc/upgrade/4.3.12/schema.Pg b/etc/upgrade/4.3.12/schema.Pg
new file mode 100644
--- /dev/null
-+++ b/etc/upgrade/4.3.1/schema.Pg
++++ b/etc/upgrade/4.3.12/schema.Pg
@@
+ALTER TABLE Tickets
+ DROP COLUMN IssueStatement,
@@ -155,17 +155,17 @@
+ DROP COLUMN AuthSystem,
+ DROP COLUMN PGPKey;
-diff --git a/etc/upgrade/4.3.1/schema.SQLite b/etc/upgrade/4.3.1/schema.SQLite
+diff --git a/etc/upgrade/4.3.12/schema.SQLite b/etc/upgrade/4.3.12/schema.SQLite
new file mode 100644
--- /dev/null
-+++ b/etc/upgrade/4.3.1/schema.SQLite
++++ b/etc/upgrade/4.3.12/schema.SQLite
@@
+-- There is no "drop column" in SQLite
-diff --git a/etc/upgrade/4.3.1/schema.mysql b/etc/upgrade/4.3.1/schema.mysql
+diff --git a/etc/upgrade/4.3.12/schema.mysql b/etc/upgrade/4.3.12/schema.mysql
new file mode 100644
--- /dev/null
-+++ b/etc/upgrade/4.3.1/schema.mysql
++++ b/etc/upgrade/4.3.12/schema.mysql
@@
+ALTER TABLE Tickets
+ DROP COLUMN IssueStatement,
More information about the rt-commit
mailing list