[Rt-commit] rt branch, master, updated. rt-4.2.12-433-g8fcafcc
Shawn Moore
shawn at bestpractical.com
Fri Oct 30 19:36:52 EDT 2015
The branch, master has been updated
via 8fcafcc33313cf83f8613e9f74142325e78d000b (commit)
via c4d914aa21276d9cb8cf82bb3fd11ff42f0b77c7 (commit)
via 6cbbd2bec98ca8410c73719e6d41dca0fc4240a2 (commit)
via dc3a582182522b6492f579fb7401cd7b8ec07b47 (commit)
via db9a032eb79e54246213da6f5da9bce7cd927b16 (commit)
via 6fff9b680869c76b0fb3b7a3554d9ed8be9f8291 (commit)
from c6ad5c4ae898472df3e6914cdd396324bf490fde (commit)
Summary of changes:
etc/schema.Oracle | 9 --
etc/schema.Pg | 9 --
etc/schema.SQLite | 9 --
etc/schema.mysql | 9 --
etc/upgrade/4.3.0/content | 73 +++++++++++++
etc/upgrade/4.3.13/schema.Oracle | 7 ++
etc/upgrade/4.3.13/schema.Pg | 12 +++
etc/upgrade/{4.3.0 => 4.3.13}/schema.SQLite | 0
etc/upgrade/4.3.13/schema.mysql | 12 +++
etc/upgrade/upgrade-mysql-schema.pl | 7 --
lib/RT/Ticket.pm | 40 --------
lib/RT/User.pm | 154 ----------------------------
share/html/Admin/Users/Modify.html | 6 +-
share/html/Admin/Users/index.html | 2 +-
share/html/Prefs/AboutMe.html | 13 +--
share/html/REST/1.0/Forms/user/default | 4 +-
t/security/CVE-2011-4460-rows-per-page.t | 2 +-
17 files changed, 112 insertions(+), 256 deletions(-)
create mode 100644 etc/upgrade/4.3.0/content
create mode 100644 etc/upgrade/4.3.13/schema.Oracle
create mode 100644 etc/upgrade/4.3.13/schema.Pg
copy etc/upgrade/{4.3.0 => 4.3.13}/schema.SQLite (100%)
create mode 100644 etc/upgrade/4.3.13/schema.mysql
- Log -----------------------------------------------------------------
commit 6fff9b680869c76b0fb3b7a3554d9ed8be9f8291
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Dec 5 12:39:37 2013 -0500
Resolution and IssueStatement have never been used in core RT; drop them
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index af9c4f8..447b1ed 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -260,8 +260,6 @@ CREATE TABLE Tickets (
IsMerged NUMBER(11,0) DEFAULT NULL NULL,
Queue NUMBER(11,0) DEFAULT 0 NOT NULL,
Type VARCHAR2(16),
- IssueStatement NUMBER(11,0) DEFAULT 0 NOT NULL,
- Resolution NUMBER(11,0) DEFAULT 0 NOT NULL,
Owner NUMBER(11,0) DEFAULT 0 NOT NULL,
Subject VARCHAR2(200) DEFAULT '[no subject]',
InitialPriority NUMBER(11,0) DEFAULT 0 NOT NULL,
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 9179cc6..ce3edd1 100644
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -413,8 +413,6 @@ CREATE TABLE Tickets (
IsMerged smallint NULL DEFAULT NULL ,
Queue integer NOT NULL DEFAULT 0 ,
Type varchar(16) NULL ,
- IssueStatement integer NOT NULL DEFAULT 0 ,
- Resolution integer NOT NULL DEFAULT 0 ,
Owner integer NOT NULL DEFAULT 0 ,
Subject varchar(200) NULL DEFAULT '[no subject]' ,
InitialPriority integer NOT NULL DEFAULT 0 ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 632cfa0..69267e5 100644
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -290,8 +290,6 @@ CREATE TABLE Tickets (
IsMerged int2 NULL DEFAULT NULL,
Queue integer NULL DEFAULT 0 ,
Type varchar(16) collate NOCASE NULL ,
- IssueStatement integer NULL DEFAULT 0 ,
- Resolution integer NULL DEFAULT 0 ,
Owner integer NULL DEFAULT 0 ,
Subject varchar(200) collate NOCASE NULL DEFAULT '[no subject]' ,
InitialPriority integer NULL DEFAULT 0 ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index ca251c2..8a59e88 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -271,8 +271,6 @@ CREATE TABLE Tickets (
IsMerged int2 NULL DEFAULT NULL,
Queue integer NOT NULL DEFAULT 0 ,
Type varchar(16) CHARACTER SET ascii NULL ,
- IssueStatement integer NOT NULL DEFAULT 0 ,
- Resolution integer NOT NULL DEFAULT 0 ,
Owner integer NOT NULL DEFAULT 0 ,
Subject varchar(200) NULL DEFAULT '[no subject]' ,
InitialPriority integer NOT NULL DEFAULT 0 ,
diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.0/schema.Oracle
new file mode 100644
index 0000000..831c6ff
--- /dev/null
+++ b/etc/upgrade/4.3.0/schema.Oracle
@@ -0,0 +1,2 @@
+ALTER TABLE Tickets
+ DROP (IssueStatement, Resolution);
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.0/schema.Pg
new file mode 100644
index 0000000..0a5dc5d
--- /dev/null
+++ b/etc/upgrade/4.3.0/schema.Pg
@@ -0,0 +1,3 @@
+ALTER TABLE Tickets
+ DROP COLUMN IssueStatement,
+ DROP COLUMN Resolution;
diff --git a/etc/upgrade/4.3.0/schema.SQLite b/etc/upgrade/4.3.0/schema.SQLite
new file mode 100644
index 0000000..7ed6f3d
--- /dev/null
+++ b/etc/upgrade/4.3.0/schema.SQLite
@@ -0,0 +1 @@
+-- There is no "drop column" in SQLite
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.0/schema.mysql
new file mode 100644
index 0000000..0a5dc5d
--- /dev/null
+++ b/etc/upgrade/4.3.0/schema.mysql
@@ -0,0 +1,3 @@
+ALTER TABLE Tickets
+ DROP COLUMN IssueStatement,
+ DROP COLUMN Resolution;
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 5b2f49f..9d78382 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -3078,42 +3078,6 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 IssueStatement
-
-Returns the current value of IssueStatement.
-(In the database, IssueStatement is stored as int(11).)
-
-
-
-=head2 SetIssueStatement VALUE
-
-
-Set IssueStatement to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, IssueStatement will be stored as a int(11).)
-
-
-=cut
-
-
-=head2 Resolution
-
-Returns the current value of Resolution.
-(In the database, Resolution is stored as int(11).)
-
-
-
-=head2 SetResolution VALUE
-
-
-Set Resolution to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Resolution will be stored as a int(11).)
-
-
-=cut
-
-
=head2 Owner
Returns the current value of Owner.
@@ -3414,10 +3378,6 @@ sub _CoreAccessible {
{read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Type =>
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
- IssueStatement =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
- Resolution =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Owner =>
{read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
Subject =>
diff --git a/t/security/CVE-2011-4460-rows-per-page.t b/t/security/CVE-2011-4460-rows-per-page.t
index 92d6853..0623408 100644
--- a/t/security/CVE-2011-4460-rows-per-page.t
+++ b/t/security/CVE-2011-4460-rows-per-page.t
@@ -21,7 +21,7 @@ $root->Load('root');
my $password = $root->__Value('Password');
ok $password, 'pulled hashed password from db';
-my $sql = q[1 union select 1+id as id, 1+id as EffectiveId, 1 as Queue, 'ticket' as Type, 0 as IssueStatement, 0 as Resolution, 12 as Owner, Password as Subject, 0 as InitialPriority, 0 as FinalPriority, 0 as Priority, 0 as TimeEstimated, 0 as TimeWorked, Name as Status, 0 as TimeLeft, null as Told, null as Starts, null as Started, null as Due, null as Resolved, 0 as LastUpdatedBy, null as LastUpdated, 6 as Creator, null as Created, 0 as Disabled from Users];
+my $sql = q[1 union select 1+id as id, 1+id as EffectiveId, 1 as Queue, 'ticket' as Type, 12 as Owner, Password as Subject, 0 as InitialPriority, 0 as FinalPriority, 0 as Priority, 0 as TimeEstimated, 0 as TimeWorked, Name as Status, 0 as TimeLeft, null as Told, null as Starts, null as Started, null as Due, null as Resolved, 0 as LastUpdatedBy, null as LastUpdated, 6 as Creator, null as Created, 0 as Disabled from Users];
RT::Interface::Web::EscapeURI(\$sql);
$m->get_ok("$base/Search/Results.html?Format=id,Subject,Status;Query=id%3E0;OrderBy=|;Rows=$sql");
commit db9a032eb79e54246213da6f5da9bce7cd927b16
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Dec 5 12:57:58 2013 -0500
EmailEncoding and WebEncoding have never been used in core RT
Additionally, their encoding differs in upgraded-from-3.6 and
upgraded-from-3.8 RT installs, because upgrade-mysql-schema.pl did not
set them to be UTF-8, but new installs of RT 3.8 defaulted them to being
so.
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 447b1ed..4b4ea21 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -222,8 +222,6 @@ CREATE TABLE Users (
RealName VARCHAR2(120),
NickName VARCHAR2(16),
Lang VARCHAR2(16),
- EmailEncoding VARCHAR2(16),
- WebEncoding VARCHAR2(16),
ExternalContactInfoId VARCHAR2(100),
ContactInfoSystem VARCHAR2(30),
ExternalAuthId VARCHAR2(100),
diff --git a/etc/schema.Pg b/etc/schema.Pg
index ce3edd1..d142018 100644
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -361,8 +361,6 @@ CREATE TABLE Users (
RealName varchar(120) NULL ,
NickName varchar(16) NULL ,
Lang varchar(16) NULL ,
- EmailEncoding varchar(16) NULL ,
- WebEncoding varchar(16) NULL ,
ExternalContactInfoId varchar(100) NULL ,
ContactInfoSystem varchar(30) NULL ,
ExternalAuthId varchar(100) NULL ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 69267e5..278eafc 100644
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -247,8 +247,6 @@ CREATE TABLE Users (
RealName varchar(120) collate NOCASE NULL ,
NickName varchar(16) collate NOCASE NULL ,
Lang varchar(16) collate NOCASE NULL ,
- EmailEncoding varchar(16) collate NOCASE NULL ,
- WebEncoding varchar(16) collate NOCASE NULL ,
ExternalContactInfoId varchar(100) collate NOCASE NULL ,
ContactInfoSystem varchar(30) collate NOCASE NULL ,
ExternalAuthId varchar(100) collate NOCASE NULL ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 8a59e88..ff0040a 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -230,8 +230,6 @@ CREATE TABLE Users (
RealName varchar(120) NULL ,
NickName varchar(16) NULL ,
Lang varchar(16) NULL ,
- EmailEncoding varchar(16) NULL ,
- WebEncoding varchar(16) NULL ,
ExternalContactInfoId varchar(100) NULL ,
ContactInfoSystem varchar(30) NULL ,
ExternalAuthId varchar(100) NULL ,
diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.0/schema.Oracle
index 831c6ff..84058bb 100644
--- a/etc/upgrade/4.3.0/schema.Oracle
+++ b/etc/upgrade/4.3.0/schema.Oracle
@@ -1,2 +1,5 @@
ALTER TABLE Tickets
DROP (IssueStatement, Resolution);
+
+ALTER TABLE Users
+ DROP (EmailEncoding, WebEncoding);
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.0/schema.Pg
index 0a5dc5d..83016f0 100644
--- a/etc/upgrade/4.3.0/schema.Pg
+++ b/etc/upgrade/4.3.0/schema.Pg
@@ -1,3 +1,7 @@
ALTER TABLE Tickets
DROP COLUMN IssueStatement,
DROP COLUMN Resolution;
+
+ALTER TABLE Users
+ DROP COLUMN EmailEncoding,
+ DROP COLUMN WebEncoding;
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.0/schema.mysql
index 0a5dc5d..83016f0 100644
--- a/etc/upgrade/4.3.0/schema.mysql
+++ b/etc/upgrade/4.3.0/schema.mysql
@@ -1,3 +1,7 @@
ALTER TABLE Tickets
DROP COLUMN IssueStatement,
DROP COLUMN Resolution;
+
+ALTER TABLE Users
+ DROP COLUMN EmailEncoding,
+ DROP COLUMN WebEncoding;
diff --git a/etc/upgrade/upgrade-mysql-schema.pl b/etc/upgrade/upgrade-mysql-schema.pl
index 92d18e3..25fa438 100755
--- a/etc/upgrade/upgrade-mysql-schema.pl
+++ b/etc/upgrade/upgrade-mysql-schema.pl
@@ -245,8 +245,6 @@ my %charset = (
RealName => 'utf8',
NickName => 'utf8',
Lang => 'ascii',
- EmailEncoding => 'ascii',
- WebEncoding => 'ascii',
ExternalContactInfoId => 'utf8',
ContactInfoSystem => 'utf8',
ExternalAuthId => 'utf8',
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index e65478d..2a2dca7 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -95,8 +95,6 @@ sub _OverlayAccessible {
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 },
ContactInfoSystem => { public => 1, admin => 1 },
ExternalAuthId => { public => 1, admin => 1 },
@@ -1947,8 +1945,6 @@ Create takes a hash of values and creates a row in the database:
varchar(120) 'RealName'.
varchar(16) 'NickName'.
varchar(16) 'Lang'.
- varchar(16) 'EmailEncoding'.
- varchar(16) 'WebEncoding'.
varchar(100) 'ExternalContactInfoId'.
varchar(30) 'ContactInfoSystem'.
varchar(100) 'ExternalAuthId'.
@@ -2179,42 +2175,6 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 EmailEncoding
-
-Returns the current value of EmailEncoding.
-(In the database, EmailEncoding is stored as varchar(16).)
-
-
-
-=head2 SetEmailEncoding VALUE
-
-
-Set EmailEncoding to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, EmailEncoding will be stored as a varchar(16).)
-
-
-=cut
-
-
-=head2 WebEncoding
-
-Returns the current value of WebEncoding.
-(In the database, WebEncoding is stored as varchar(16).)
-
-
-
-=head2 SetWebEncoding VALUE
-
-
-Set WebEncoding to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, WebEncoding will be stored as a varchar(16).)
-
-
-=cut
-
-
=head2 ExternalContactInfoId
Returns the current value of ExternalContactInfoId.
@@ -2603,10 +2563,6 @@ sub _CoreAccessible {
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
Lang =>
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
- EmailEncoding =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
- WebEncoding =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
ExternalContactInfoId =>
{read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
ContactInfoSystem =>
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 426d262..fdde172 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -242,7 +242,7 @@ $ARGS{Disabled} = $ARGS{Enabled} ? 0 : 1;
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
index 94d0fa5..aab24ff 100644
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -140,7 +140,7 @@ my %sorted = map { $_ => $i++ } qw(
);
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
index 5cb9a31..67e5f70 100644
--- a/share/html/Prefs/AboutMe.html
+++ b/share/html/Prefs/AboutMe.html
@@ -225,7 +225,7 @@ if ( $ARGS{'ResetAuthToken'} ) {
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
@@ -287,8 +287,6 @@ $SetPrivileged => undef
$Enabled => undef
$SetEnabled => undef
$Lang => undef
-$EmailEncoding => undef
-$WebEncoding => undef
$ExternalContactInfoId => undef
$ContactInfoSystem => undef
$Gecos => undef
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
index 53d0e28..1ac213b 100644
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@ -62,8 +62,8 @@ my $user = RT::User->new($session{CurrentUser});
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 ) {
commit dc3a582182522b6492f579fb7401cd7b8ec07b47
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Dec 5 13:14:53 2013 -0500
Drop all "external contact" columns from users
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 4b4ea21..5171dc7 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -222,10 +222,6 @@ CREATE TABLE Users (
RealName VARCHAR2(120),
NickName VARCHAR2(16),
Lang VARCHAR2(16),
- ExternalContactInfoId VARCHAR2(100),
- ContactInfoSystem VARCHAR2(30),
- ExternalAuthId VARCHAR2(100),
- AuthSystem VARCHAR2(30),
Gecos VARCHAR2(16),
HomePhone VARCHAR2(30),
WorkPhone VARCHAR2(30),
diff --git a/etc/schema.Pg b/etc/schema.Pg
index d142018..3456f2e 100644
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -361,10 +361,6 @@ CREATE TABLE Users (
RealName varchar(120) NULL ,
NickName varchar(16) NULL ,
Lang varchar(16) NULL ,
- ExternalContactInfoId varchar(100) NULL ,
- ContactInfoSystem varchar(30) NULL ,
- ExternalAuthId varchar(100) NULL ,
- AuthSystem varchar(30) NULL ,
Gecos varchar(16) NULL ,
HomePhone varchar(30) NULL ,
WorkPhone varchar(30) NULL ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 278eafc..318e617 100644
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -247,10 +247,6 @@ CREATE TABLE Users (
RealName varchar(120) collate NOCASE NULL ,
NickName varchar(16) collate NOCASE NULL ,
Lang varchar(16) collate NOCASE NULL ,
- ExternalContactInfoId varchar(100) collate NOCASE NULL ,
- ContactInfoSystem varchar(30) collate NOCASE NULL ,
- ExternalAuthId varchar(100) collate NOCASE NULL ,
- AuthSystem varchar(30) collate NOCASE NULL ,
Gecos varchar(16) collate NOCASE NULL ,
HomePhone varchar(30) collate NOCASE NULL ,
WorkPhone varchar(30) collate NOCASE NULL ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index ff0040a..8be9b4f 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -230,10 +230,6 @@ CREATE TABLE Users (
RealName varchar(120) NULL ,
NickName varchar(16) NULL ,
Lang varchar(16) NULL ,
- ExternalContactInfoId varchar(100) NULL ,
- ContactInfoSystem varchar(30) NULL ,
- ExternalAuthId varchar(100) NULL ,
- AuthSystem varchar(30) NULL ,
Gecos varchar(16) NULL ,
HomePhone varchar(30) NULL ,
WorkPhone varchar(30) NULL ,
diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.0/schema.Oracle
index 84058bb..47795d3 100644
--- a/etc/upgrade/4.3.0/schema.Oracle
+++ b/etc/upgrade/4.3.0/schema.Oracle
@@ -2,4 +2,5 @@ ALTER TABLE Tickets
DROP (IssueStatement, Resolution);
ALTER TABLE Users
- DROP (EmailEncoding, WebEncoding);
+ DROP (EmailEncoding, WebEncoding,
+ ExternalContactInfoId, ContactInfoSystem, ExternalAuthId, AuthSystem);
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.0/schema.Pg
index 83016f0..6dd7bc9 100644
--- a/etc/upgrade/4.3.0/schema.Pg
+++ b/etc/upgrade/4.3.0/schema.Pg
@@ -4,4 +4,8 @@ ALTER TABLE Tickets
ALTER TABLE Users
DROP COLUMN EmailEncoding,
- DROP COLUMN WebEncoding;
+ DROP COLUMN WebEncoding,
+ DROP COLUMN ExternalContactInfoId,
+ DROP COLUMN ContactInfoSystem,
+ DROP COLUMN ExternalAuthId,
+ DROP COLUMN AuthSystem;
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.0/schema.mysql
index 83016f0..6dd7bc9 100644
--- a/etc/upgrade/4.3.0/schema.mysql
+++ b/etc/upgrade/4.3.0/schema.mysql
@@ -4,4 +4,8 @@ ALTER TABLE Tickets
ALTER TABLE Users
DROP COLUMN EmailEncoding,
- DROP COLUMN WebEncoding;
+ DROP COLUMN WebEncoding,
+ DROP COLUMN ExternalContactInfoId,
+ DROP COLUMN ContactInfoSystem,
+ DROP COLUMN ExternalAuthId,
+ DROP COLUMN AuthSystem;
diff --git a/etc/upgrade/upgrade-mysql-schema.pl b/etc/upgrade/upgrade-mysql-schema.pl
index 25fa438..cce17ba 100755
--- a/etc/upgrade/upgrade-mysql-schema.pl
+++ b/etc/upgrade/upgrade-mysql-schema.pl
@@ -245,10 +245,6 @@ my %charset = (
RealName => 'utf8',
NickName => 'utf8',
Lang => 'ascii',
- ExternalContactInfoId => 'utf8',
- ContactInfoSystem => 'utf8',
- ExternalAuthId => 'utf8',
- AuthSystem => 'utf8',
Gecos => 'utf8',
HomePhone => 'utf8',
WorkPhone => 'utf8',
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 2a2dca7..74106e4 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -95,10 +95,6 @@ sub _OverlayAccessible {
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 }, # loc_left_pair
PGPKey => { public => 1, admin => 1 }, # loc_left_pair
SMIMECertificate => { public => 1, admin => 1 }, # loc_left_pair
@@ -1945,10 +1941,6 @@ Create takes a hash of values and creates a row in the database:
varchar(120) 'RealName'.
varchar(16) 'NickName'.
varchar(16) 'Lang'.
- varchar(100) 'ExternalContactInfoId'.
- varchar(30) 'ContactInfoSystem'.
- varchar(100) 'ExternalAuthId'.
- varchar(30) 'AuthSystem'.
varchar(16) 'Gecos'.
varchar(30) 'HomePhone'.
varchar(30) 'WorkPhone'.
@@ -2175,78 +2167,6 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ExternalContactInfoId
-
-Returns the current value of ExternalContactInfoId.
-(In the database, ExternalContactInfoId is stored as varchar(100).)
-
-
-
-=head2 SetExternalContactInfoId VALUE
-
-
-Set ExternalContactInfoId to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ExternalContactInfoId will be stored as a varchar(100).)
-
-
-=cut
-
-
-=head2 ContactInfoSystem
-
-Returns the current value of ContactInfoSystem.
-(In the database, ContactInfoSystem is stored as varchar(30).)
-
-
-
-=head2 SetContactInfoSystem VALUE
-
-
-Set ContactInfoSystem to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ContactInfoSystem will be stored as a varchar(30).)
-
-
-=cut
-
-
-=head2 ExternalAuthId
-
-Returns the current value of ExternalAuthId.
-(In the database, ExternalAuthId is stored as varchar(100).)
-
-
-
-=head2 SetExternalAuthId VALUE
-
-
-Set ExternalAuthId to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ExternalAuthId will be stored as a varchar(100).)
-
-
-=cut
-
-
-=head2 AuthSystem
-
-Returns the current value of AuthSystem.
-(In the database, AuthSystem is stored as varchar(30).)
-
-
-
-=head2 SetAuthSystem VALUE
-
-
-Set AuthSystem to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, AuthSystem will be stored as a varchar(30).)
-
-
-=cut
-
-
=head2 Gecos
Returns the current value of Gecos.
@@ -2563,14 +2483,6 @@ sub _CoreAccessible {
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
Lang =>
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
- ExternalContactInfoId =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
- ContactInfoSystem =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
- ExternalAuthId =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
- AuthSystem =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
Gecos =>
{read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
HomePhone =>
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index fdde172..70f0f8f 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -242,10 +242,8 @@ $ARGS{Disabled} = $ARGS{Enabled} ? 0 : 1;
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
index aab24ff..72b2f9c 100644
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -140,7 +140,7 @@ my %sorted = map { $_ => $i++ } qw(
);
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
index 67e5f70..d8a14cf 100644
--- a/share/html/Prefs/AboutMe.html
+++ b/share/html/Prefs/AboutMe.html
@@ -225,10 +225,9 @@ if ( $ARGS{'ResetAuthToken'} ) {
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(
@@ -287,11 +286,7 @@ $SetPrivileged => undef
$Enabled => undef
$SetEnabled => undef
$Lang => undef
-$ExternalContactInfoId => undef
-$ContactInfoSystem => undef
$Gecos => undef
-$ExternalAuthId => undef
-$AuthSystem => undef
$HomePhone => undef
$WorkPhone => undef
$MobilePhone => undef
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
index 1ac213b..0d2ba4f 100644
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@ -62,9 +62,7 @@ my $user = RT::User->new($session{CurrentUser});
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;
commit 6cbbd2bec98ca8410c73719e6d41dca0fc4240a2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Dec 5 13:22:33 2013 -0500
Drop never-used PGPKey column on users
While we may in the future want a non-Attribute store for PGP keys, it
will most likely need to be many-to-one, and will want to be free of any
baggage which local customizations of previous versions may have slipped
in.
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index 5171dc7..3d82905 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -234,7 +234,6 @@ CREATE TABLE Users (
Zip VARCHAR2(16),
Country VARCHAR2(50),
Timezone VARCHAR2(50),
- PGPKey CLOB,
SMIMECertificate CLOB,
Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
Created DATE,
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 3456f2e..b93f789 100644
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -373,7 +373,6 @@ CREATE TABLE Users (
Zip varchar(16) NULL ,
Country varchar(50) NULL ,
Timezone varchar(50) NULL ,
- PGPKey text NULL,
SMIMECertificate text NULL,
Creator integer NOT NULL DEFAULT 0 ,
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index 318e617..4941f4f 100644
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -259,7 +259,6 @@ CREATE TABLE Users (
Zip varchar(16) collate NOCASE NULL ,
Country varchar(50) collate NOCASE NULL ,
Timezone char(50) NULL ,
- PGPKey text collate NOCASE NULL,
SMIMECertificate text collate NOCASE NULL,
Creator integer NULL DEFAULT 0 ,
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 8be9b4f..ea28253 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -242,7 +242,6 @@ CREATE TABLE Users (
Zip varchar(16) NULL ,
Country varchar(50) NULL ,
Timezone varchar(50) NULL ,
- PGPKey text NULL,
SMIMECertificate text NULL,
Creator integer NOT NULL DEFAULT 0 ,
diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.0/schema.Oracle
index 47795d3..4f31a35 100644
--- a/etc/upgrade/4.3.0/schema.Oracle
+++ b/etc/upgrade/4.3.0/schema.Oracle
@@ -3,4 +3,5 @@ ALTER TABLE Tickets
ALTER TABLE Users
DROP (EmailEncoding, WebEncoding,
- ExternalContactInfoId, ContactInfoSystem, ExternalAuthId, AuthSystem);
+ ExternalContactInfoId, ContactInfoSystem, ExternalAuthId, AuthSystem,
+ PGPKey);
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.0/schema.Pg
index 6dd7bc9..ef2c27f 100644
--- a/etc/upgrade/4.3.0/schema.Pg
+++ b/etc/upgrade/4.3.0/schema.Pg
@@ -8,4 +8,5 @@ ALTER TABLE Users
DROP COLUMN ExternalContactInfoId,
DROP COLUMN ContactInfoSystem,
DROP COLUMN ExternalAuthId,
- DROP COLUMN AuthSystem;
+ DROP COLUMN AuthSystem,
+ DROP COLUMN PGPKey;
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.0/schema.mysql
index 6dd7bc9..ef2c27f 100644
--- a/etc/upgrade/4.3.0/schema.mysql
+++ b/etc/upgrade/4.3.0/schema.mysql
@@ -8,4 +8,5 @@ ALTER TABLE Users
DROP COLUMN ExternalContactInfoId,
DROP COLUMN ContactInfoSystem,
DROP COLUMN ExternalAuthId,
- DROP COLUMN AuthSystem;
+ DROP COLUMN AuthSystem,
+ DROP COLUMN PGPKey;
diff --git a/etc/upgrade/upgrade-mysql-schema.pl b/etc/upgrade/upgrade-mysql-schema.pl
index cce17ba..d9e2813 100755
--- a/etc/upgrade/upgrade-mysql-schema.pl
+++ b/etc/upgrade/upgrade-mysql-schema.pl
@@ -257,7 +257,6 @@ my %charset = (
Zip => 'utf8',
Country => 'utf8',
Timezone => 'ascii',
- PGPKey => 'binary',
},
);
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index 74106e4..18dc035 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -96,7 +96,6 @@ sub _OverlayAccessible {
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
@@ -1953,7 +1952,6 @@ Create takes a hash of values and creates a row in the database:
varchar(16) 'Zip'.
varchar(50) 'Country'.
varchar(50) 'Timezone'.
- text 'PGPKey'.
=cut
@@ -2383,24 +2381,6 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 PGPKey
-
-Returns the current value of PGPKey.
-(In the database, PGPKey is stored as text.)
-
-
-
-=head2 SetPGPKey VALUE
-
-
-Set PGPKey to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, PGPKey will be stored as a text.)
-
-
-=cut
-
-
=head2 SMIMECertificate
Returns the current value of SMIMECertificate.
@@ -2507,8 +2487,6 @@ sub _CoreAccessible {
{read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
Timezone =>
{read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
- PGPKey =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
SMIMECertificate =>
{read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
Creator =>
diff --git a/share/html/Admin/Users/index.html b/share/html/Admin/Users/index.html
index 72b2f9c..c254df7 100644
--- a/share/html/Admin/Users/index.html
+++ b/share/html/Admin/Users/index.html
@@ -140,7 +140,7 @@ my %sorted = map { $_ => $i++ } qw(
);
my @attrs = sort { $sorted{$a} <=> $sorted{$b} }
- grep { !/(?:^id$|ContactInfo|PGPKey|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
+ grep { !/(?:^id$|ContactInfo|AuthToken|^Last|^Creat(?:ed|or)$|^Signature$)/ }
RT::User->ReadableAttributes;
my @fields;
commit c4d914aa21276d9cb8cf82bb3fd11ff42f0b77c7
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Fri May 15 21:20:05 2015 +0000
Bail out if a column we'll drop has any values
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.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
new file mode 100644
index 0000000..96edfd0
--- /dev/null
+++ b/etc/upgrade/4.3.0/content
@@ -0,0 +1,73 @@
+use strict;
+use warnings;
+
+our @Initial = (
+ sub {
+ RT->Logger->debug('Make sure all columns we will drop are empty');
+
+ # Tickets
+ my @ticket_errors;
+
+ for my $column (qw/IssueStatement Resolution/) {
+ my $tickets = RT::Tickets->new(RT->SystemUser);
+ $tickets->{'allow_deleted_search'} = 1;
+ $tickets->Limit(
+ FIELD => $column,
+ OPERATOR => '!=',
+ VALUE => 0,
+ ENTRYAGGREGATOR => 'AND',
+ );
+ $tickets->Limit(
+ FIELD => $column,
+ OPERATOR => 'IS NOT',
+ VALUE => 'NULL',
+ ENTRYAGGREGATOR => 'AND',
+ );
+
+ if ($tickets->Count) {
+ push @ticket_errors, [$tickets->Count, $column];
+ }
+ }
+
+ # Users
+ my @user_errors;
+
+ for my $column (qw/
+ EmailEncoding WebEncoding ExternalContactInfoId
+ ContactInfoSystem ExternalAuthId AuthSystem PGPKey
+ /) {
+ my $users = RT::Users->new(RT->SystemUser);
+ $users->{'find_disabled_rows'} = 1;
+
+ $users->Limit(
+ FIELD => $column,
+ OPERATOR => '!=',
+ VALUE => '',
+ ENTRYAGGREGATOR => 'AND',
+ );
+ $users->Limit(
+ FIELD => $column,
+ OPERATOR => 'IS NOT',
+ VALUE => 'NULL',
+ ENTRYAGGREGATOR => 'AND',
+ );
+
+ if ($users->Count) {
+ push @user_errors, [$users->Count, $column];
+ }
+ }
+
+ for (@ticket_errors) {
+ my ($count, $column) = @$_;
+ warn "You have $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 because this upgrade will drop these columns.";
+ }
+
+ for (@user_errors) {
+ my ($count, $column) = @$_;
+ warn "You have $count users(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 user values to a custom field or an attribute because this upgrade will drop these columns.";
+ }
+
+ exit 1 if @ticket_errors || @user_errors;
+ },
+);
+
diff --git a/etc/upgrade/4.3.0/schema.Oracle b/etc/upgrade/4.3.13/schema.Oracle
similarity index 100%
rename from etc/upgrade/4.3.0/schema.Oracle
rename to etc/upgrade/4.3.13/schema.Oracle
diff --git a/etc/upgrade/4.3.0/schema.Pg b/etc/upgrade/4.3.13/schema.Pg
similarity index 100%
rename from etc/upgrade/4.3.0/schema.Pg
rename to etc/upgrade/4.3.13/schema.Pg
diff --git a/etc/upgrade/4.3.0/schema.SQLite b/etc/upgrade/4.3.13/schema.SQLite
similarity index 100%
rename from etc/upgrade/4.3.0/schema.SQLite
rename to etc/upgrade/4.3.13/schema.SQLite
diff --git a/etc/upgrade/4.3.0/schema.mysql b/etc/upgrade/4.3.13/schema.mysql
similarity index 100%
rename from etc/upgrade/4.3.0/schema.mysql
rename to etc/upgrade/4.3.13/schema.mysql
commit 8fcafcc33313cf83f8613e9f74142325e78d000b
Merge: c6ad5c4 c4d914a
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Fri Oct 30 23:36:36 2015 +0000
Merge branch '4.4/drop-unused-columns'
-----------------------------------------------------------------------
More information about the rt-commit
mailing list