diff options
author | ivan <ivan> | 2004-12-03 20:40:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-12-03 20:40:48 +0000 |
commit | f7fd2a3e34da751cbc02bbf215e99c6dc89adc15 (patch) | |
tree | 495d4c785a1aac113236511cdf8c1e5ce2a4f5ee /rt/etc | |
parent | 2d98f7dcda48d4c38e748d3301cce956cb5e6c06 (diff) | |
parent | d39d52aac8f38ea9115628039f0df5aa3ac826de (diff) |
This commit was generated by cvs2svn to compensate for changes in r3921,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/etc')
-rw-r--r-- | rt/etc/RT_Config.pm.in | 41 | ||||
-rw-r--r-- | rt/etc/acl.Sybase | 6 | ||||
-rw-r--r-- | rt/etc/constraints.mysql | 45 | ||||
-rw-r--r-- | rt/etc/drop.Oracle | 2 | ||||
-rw-r--r-- | rt/etc/initialdata | 18 | ||||
-rw-r--r-- | rt/etc/schema.Informix | 19 | ||||
-rw-r--r-- | rt/etc/schema.SQLite | 21 | ||||
-rw-r--r-- | rt/etc/schema.Sybase | 444 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.0/acl.Informix | 4 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/acl.Oracle | 4 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/acl.Pg | 19 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/acl.SQLite | 4 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/acl.mysql | 4 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.0/content | 2 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.0/schema.Informix | 17 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.0/schema.Oracle | 17 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/schema.Pg | 25 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.0/schema.SQLite | 20 | ||||
-rwxr-xr-x | rt/etc/upgrade/3.1.0/schema.mysql | 21 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.15/content | 7 | ||||
-rw-r--r-- | rt/etc/upgrade/3.1.17/content | 22 |
21 files changed, 759 insertions, 3 deletions
diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index b9ddd4596..7f967061d 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -136,6 +136,10 @@ Set($RTAddressRegexp , '^rt\@example.com$'); Set($CanonicalizeEmailAddressMatch , 'subdomain.example.com$'); Set($CanonicalizeEmailAddressReplace , 'example.com'); +# set this to true and the create new user page will use the values that you +# enter in the form but use the function CanonicalizeUserInfo in User_Local.pm +Set($CanonicalizeOnCreate , 0); + # If $SenderMustExistInExternalDatabase is true, RT will refuse to # create non-privileged accounts for unknown users if you are using # the "LookupSenderInExternalDatabase" option. @@ -214,12 +218,15 @@ Set($UseFriendlyToLine , 0); # are WatcherType and TicketId. Set($FriendlyToLineFormat, "\"%s of $RT::rtname Ticket #%s\":;"); -# By default RT doesn't notify the person who performs an update, as they +# By default, RT doesn't notify the person who performs an update, as they # already know what they've done. If you'd like to change this behaviour, # Set $NotifyActor to 1 Set($NotifyActor, 0); +# By default, RT records each message it sends out to its own internal database.# To change this behaviour, set $RecordOutgoingEmail to 0 + +Set($RecordOutgoingEmail, 1); # }}} @@ -275,12 +282,17 @@ Set($WebURL , $WebBaseURL . $WebPath . "/"); # $WebImagesURL points to the base URL where RT can find its images. -Set($WebImagesURL , $WebURL . "NoAuth/images/"); +Set($WebImagesURL , $WebPath . "/NoAuth/images/"); # $RTLogoURL points to the URL of the RT logo displayed in the web UI Set($LogoURL , $WebImagesURL . "rt.jpg"); +# WebNoAuthRegex - What portion of RT's URLspace should not require +# authentication. +Set($WebNoAuthRegex, qr!^(?:/+NoAuth/| + /+REST/\d+\.\d+/NoAuth/)!x ); + # For message boxes, set the entry box width and what type of wrapping # to use. # @@ -295,6 +307,14 @@ Set($MessageBoxWrap, "HARD"); # sent in a request (although there is probably more to it than that) Set($TrustHTMLAttachments , undef); + +# If PreferRichText is set to a true value, RT will show HTML/Rich text +# messages in preference to their plaintext alternatives. RT "scrubs" the +# html to show only a minimal subset of HTML to avoid possible contamination +# by cross-site-scripting attacks. + +Set($PreferRichText, undef); + # If $WebExternalAuth is defined, RT will defer to the environment's # REMOTE_USER variable. @@ -347,6 +367,23 @@ Set($MyRequestsLength, 10); @MasonParameters = () unless (@MasonParameters); +# $DefaultSearchResultFormat is the default format for RT search results +Set ($DefaultSearchResultFormat, qq{ + '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#', + '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject', + Status, + QueueName, + OwnerName, + Priority, + '__NEWLINE__', + '', + '<small>__Requestors__</small>', + '<small>__CreatedRelative__</small>', + '<small>__ToldRelative__</small>', + '<small>__LastUpdatedRelative__</small>', + '<small>__TimeLeft__</small>'}); + + # }}} # {{{ RT UTF-8 Settings diff --git a/rt/etc/acl.Sybase b/rt/etc/acl.Sybase new file mode 100644 index 000000000..6192b4ebe --- /dev/null +++ b/rt/etc/acl.Sybase @@ -0,0 +1,6 @@ +sub acl { +return ( +"SP_ADDLOGIN ${RT::DatabaseUser}, ${RT::DatabasePassword}, ${RT::DatabaseName} ", +); +} +1; diff --git a/rt/etc/constraints.mysql b/rt/etc/constraints.mysql index fd557d5e4..355d2c5e5 100644 --- a/rt/etc/constraints.mysql +++ b/rt/etc/constraints.mysql @@ -1,42 +1,85 @@ - ALTER TABLE Links ADD FOREIGN KEY (LocalBase) REFERENCES Tickets(id) ; + + ALTER TABLE Links ADD INDEX(LocalBase); + ALTER TABLE Links ADD FOREIGN KEY (LocalBase) REFERENCES Tickets(id); + ALTER TABLE Links ADD INDEX(LocalTarget); ALTER TABLE Links ADD FOREIGN KEY (LocalTarget) REFERENCES Tickets(id); + ALTER TABLE Tickets ADD INDEX(Queue); ALTER TABLE Tickets ADD FOREIGN KEY (Queue) REFERENCES Queues(id); + ALTER TABLE Tickets ADD INDEX(EffectiveId); ALTER TABLE Tickets ADD FOREIGN KEY (EffectiveId) REFERENCES Tickets(id); + ALTER TABLE Tickets ADD INDEX(Owner); ALTER TABLE Tickets ADD FOREIGN KEY (Owner) REFERENCES Principals(id); + ALTER TABLE Tickets ADD INDEX(Creator); + ALTER TABLE Tickets ADD INDEX(LastUpdatedBy); ALTER TABLE Tickets ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE Tickets ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE Transactions ADD INDEX(Creator); + ALTER TABLE Transactions ADD INDEX (Ticket) ; + ALTER TABLE Transactions ADD INDEX (EffectiveTicket) ; ALTER TABLE Transactions ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE Transactions ADD FOREIGN KEY (Ticket) REFERENCES Tickets(id); ALTER TABLE Transactions ADD FOREIGN KEY (EffectiveTicket) REFERENCES Tickets(id); + ALTER TABLE Attachments ADD INDEX (TransactionId) ; + ALTER TABLE Attachments ADD INDEX (Parent) ; ALTER TABLE Attachments ADD FOREIGN KEY (TransactionId) REFERENCES Transactions(id); ALTER TABLE Attachments ADD FOREIGN KEY (Parent) REFERENCES Attachments(id); + ALTER TABLE Scrips ADD INDEX (ScripCondition) ; + ALTER TABLE Scrips ADD INDEX (ScripAction) ; + ALTER TABLE Scrips ADD INDEX (Template) ; + ALTER TABLE Scrips ADD INDEX (Queue) ; + ALTER TABLE Scrips ADD INDEX (Creator) ; + ALTER TABLE Scrips ADD INDEX (LastUpdatedBy) ; ALTER TABLE Scrips ADD FOREIGN KEY (ScripCondition) REFERENCES ScripConditions(id); ALTER TABLE Scrips ADD FOREIGN KEY (ScripAction) REFERENCES ScripActions(id); ALTER TABLE Scrips ADD FOREIGN KEY (Template) REFERENCES Templates(id); ALTER TABLE Scrips ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE Scrips ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE Scrips ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE ACL ADD INDEX (PrincipalId) ; + ALTER TABLE ACL ADD INDEX (DelegatedBy) ; + ALTER TABLE ACL ADD INDEX (DelegatedFrom) ; ALTER TABLE ACL ADD FOREIGN KEY (PrincipalId) REFERENCES Principals(id); ALTER TABLE ACL ADD FOREIGN KEY (DelegatedBy) REFERENCES Principals(id); ALTER TABLE ACL ADD FOREIGN KEY (DelegatedFrom) REFERENCES ACL(id); + ALTER TABLE GroupMembers ADD INDEX (MemberId); + ALTER TABLE GroupMembers ADD INDEX (GroupId); ALTER TABLE GroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Groups(id); ALTER TABLE GroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id); + ALTER TABLE CachedGroupMembers ADD INDEX (ImmediateParentId) ; + ALTER TABLE CachedGroupMembers ADD INDEX (GroupId) ; + ALTER TABLE CachedGroupMembers ADD INDEX (MemberId) ; + ALTER TABLE CachedGroupMembers ADD INDEX (Via) ; ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (ImmediateParentId) REFERENCES Principals(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Principals(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (Via) REFERENCES CachedGroupMembers(id); + ALTER TABLE ScripActions ADD INDEX(Creator); + ALTER TABLE ScripActions ADD INDEX(LastUpdatedBy); ALTER TABLE ScripActions ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE ScripActions ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE Templates ADD INDEX(Queue); + ALTER TABLE Templates ADD INDEX(Creator); + ALTER TABLE Templates ADD INDEX(LastUpdatedBy); ALTER TABLE Templates ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE Templates ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE Templates ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE CustomFields ADD INDEX(Queue); + ALTER TABLE CustomFields ADD INDEX(Creator); + ALTER TABLE CustomFields ADD INDEX(LastUpdatedBy); ALTER TABLE CustomFields ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE CustomFields ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE CustomFields ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE TicketCustomFieldValues ADD INDEX(Ticket); + ALTER TABLE TicketCustomFieldValues ADD INDEX(CustomField); + ALTER TABLE TicketCustomFieldValues ADD INDEX(Creator); + ALTER TABLE TicketCustomFieldValues ADD INDEX(LastUpdatedBy); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (Ticket) REFERENCES Tickets(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (CustomField) REFERENCES CustomFields(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE TicketCustomFieldValues ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); + ALTER TABLE CustomFieldValues ADD INDEX(CustomField); + ALTER TABLE CustomFieldValues ADD INDEX(Creator); + ALTER TABLE CustomFieldValues ADD INDEX(LastUpdatedBy); ALTER TABLE CustomFieldValues ADD FOREIGN KEY (CustomField) REFERENCES CustomFields(id); ALTER TABLE CustomFieldValues ADD FOREIGN KEY (Creator) REFERENCES Users(id); ALTER TABLE CustomFieldValues ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); diff --git a/rt/etc/drop.Oracle b/rt/etc/drop.Oracle index dd11376f2..4ce5de475 100644 --- a/rt/etc/drop.Oracle +++ b/rt/etc/drop.Oracle @@ -1,5 +1,6 @@ DROP TABLE ACL; DROP TABLE ATTACHMENTS; +DROP TABLE ATTRIBUTES; DROP TABLE CACHEDGROUPMEMBERS; DROP TABLE CUSTOMFIELDS; DROP TABLE CUSTOMFIELDVALUES; @@ -19,6 +20,7 @@ DROP TABLE TRANSACTIONS; DROP TABLE USERS; DROP SEQUENCE ACL_seq; DROP SEQUENCE ATTACHMENTS_seq; +DROP SEQUENCE ATTRIBUTES_seq; DROP SEQUENCE CACHEDGROUPMEMBERS_seq; DROP SEQUENCE CUSTOMFIELDS_seq; DROP SEQUENCE CUSTOMFIELDVALUES_seq; diff --git a/rt/etc/initialdata b/rt/etc/initialdata index e360c5daf..d5d3b2022 100644 --- a/rt/etc/initialdata +++ b/rt/etc/initialdata @@ -86,6 +86,14 @@ Description => 'Sends mail to the owner', # loc ExecModule => 'Notify', Argument => 'Owner' }, + { Name => 'Notify Ccs as Comment', # loc + Description => 'Sends mail to the Ccs as a comment', # loc + ExecModule => 'NotifyAsComment', + Argument => 'Cc' }, + { Name => 'Notify Ccs', # loc + Description => 'Sends mail to the Ccs', # loc + ExecModule => 'Notify', + Argument => 'Cc' }, { Name => 'Notify AdminCcs as Comment', # loc Description => 'Sends mail to the administrative Ccs as a comment', # loc ExecModule => 'NotifyAsComment', @@ -166,6 +174,13 @@ }, { + Name => 'On Priority Change', # loc + Description => 'Whenever a ticket\'s priority changes', # loc + ApplicableTransTypes => 'Set', + ExecModule => 'PriorityChange', + }, + { + Name => 'On Owner Change', # loc Description => 'Whenever a ticket\'s owner changes', # loc ApplicableTransTypes => 'Any', @@ -373,6 +388,9 @@ Your ticket has been rejected by { eval { $Approval->OwnerObj->Name } }. { ScripCondition => 'On Correspond', ScripAction => 'Open Tickets', Template => 'Blank' }, + { ScripCondition => 'On Owner Change', + ScripAction => 'Notify Owner', + Template => 'Transaction' }, { ScripCondition => 'On Create', ScripAction => 'AutoReply To Requestors', Template => 'AutoReply' }, diff --git a/rt/etc/schema.Informix b/rt/etc/schema.Informix index ca6173f36..20c607e85 100644 --- a/rt/etc/schema.Informix +++ b/rt/etc/schema.Informix @@ -333,6 +333,25 @@ CREATE TABLE CustomFieldValues ( CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField); +CREATE TABLE Attributes ( + id SERIAL, + Name VARCHAR(255) DEFAULT '' NOT NULL, + Description VARCHAR(255) DEFAULT NULL, + Content BYTE, + ContentType VARCHAR(16), + ObjectType VARCHAR(25) NOT NULL, + ObjectId INTEGER DEFAULT 0 NOT NULL, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + LastUpdatedBy INTEGER DEFAULT 0 NOT NULL, + LastUpdated DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + + CREATE TABLE sessions ( id VARCHAR(32) NOT NULL, a_session BYTE, diff --git a/rt/etc/schema.SQLite b/rt/etc/schema.SQLite index b10ff46d1..174664662 100644 --- a/rt/etc/schema.SQLite +++ b/rt/etc/schema.SQLite @@ -388,3 +388,24 @@ CREATE TABLE CustomFieldValues ( CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField); --- }}} + +--- {{{ Attributes +CREATE TABLE Attributes ( + id INTEGER PRIMARY KEY , + Name varchar(255) NOT NULL , + Description varchar(255) NULL , + Content LONGTEXT NULL , + ContentType varchar(16), + ObjectType varchar(25) NOT NULL , + ObjectId INTEGER default 0, + Creator integer NULL , + Created DATETIME NULL , + LastUpdatedBy integer NULL , + LastUpdated DATETIME NULL + +) ; +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + +--- }}} + diff --git a/rt/etc/schema.Sybase b/rt/etc/schema.Sybase new file mode 100644 index 000000000..67a411d13 --- /dev/null +++ b/rt/etc/schema.Sybase @@ -0,0 +1,444 @@ +# {{{ Attachments + +CREATE TABLE rt3.Attachments ( + id numeric(38,0) identity, + TransactionId integer NOT NULL , + Parent integer NOT NULL , + MessageId varchar(160) NULL , + Subject varchar(255) NULL , + Filename varchar(255) NULL , + ContentType varchar(80) NULL , + ContentEncoding varchar(80) NULL , + Content TEXT NULL , + Headers TEXT NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX Attachments1 ON Attachments (Parent) ; +CREATE INDEX Attachments2 ON Attachments (TransactionId) ; +CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ; +# }}} + +# {{{ Queues +CREATE TABLE rt3.Queues ( + id numeric(38,0) identity, + Name varchar(200) NOT NULL , + Description varchar(255) NULL , + CorrespondAddress varchar(120) NULL , + CommentAddress varchar(120) NULL , + InitialPriority integer NOT NULL , + FinalPriority integer NOT NULL , + DefaultDueIn integer NOT NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + Disabled numeric(1) NOT NULL , + PRIMARY KEY (id) +) ; +CREATE UNIQUE INDEX Queues1 ON Queues (Name) ; +CREATE INDEX Queues2 ON Queues (Disabled) ; + +# }}} + +# {{{ Links + +CREATE TABLE rt3.Links ( + id numeric(38,0) identity, + Base varchar(240) NULL , + Target varchar(240) NULL , + Type varchar(20) NOT NULL , + LocalTarget integer NOT NULL , + LocalBase integer NOT NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + PRIMARY KEY (id) +) ; + +CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ; +CREATE INDEX Links2 ON Links (Base, Type) ; +CREATE INDEX Links3 ON Links (Target, Type) ; +CREATE INDEX Links4 ON Links(Type,LocalBase); + +# }}} + +# {{{ Principals + +CREATE TABLE rt3.Principals ( + id numeric(38,0) identity, + PrincipalType VARCHAR(16) not null, + ObjectId integer, Disabled numeric(1) NOT NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX Principals2 ON Principals (ObjectId); + +# }}} + +# {{{ Groups + +CREATE TABLE rt3.Groups ( + id numeric(38,0) identity, + Name varchar(200) NULL , + Description varchar(255) NULL , + Domain varchar(64), + Type varchar(64), + Instance integer, + PRIMARY KEY (id) +) ; + +CREATE INDEX Groups1 ON Groups (Domain,Instance,Type,id); +CREATE INDEX Groups2 On Groups (Type, Instance, Domain); + +# }}} + +# {{{ ScripConditions + +CREATE TABLE rt3.ScripConditions ( + id numeric(38,0) identity, + Name varchar(200) NULL , + Description varchar(255) NULL , + ExecModule varchar(60) NULL , + Argument varchar(255) NULL , + ApplicableTransTypes varchar(60) NULL , + + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +# }}} + +# {{{ Transactions +CREATE TABLE rt3.Transactions ( + id numeric(38,0) identity, + EffectiveTicket integer NOT NULL , + Ticket integer NOT NULL , + TimeTaken integer NOT NULL , + Type varchar(20) NULL , + Field varchar(40) NULL , + OldValue varchar(255) NULL , + NewValue varchar(255) NULL , + Data varchar(255) NULL , + + Creator integer NOT NULL , + Created DATETIME NULL , + PRIMARY KEY (id) +) ; +CREATE INDEX Transactions1 ON Transactions (Ticket); +CREATE INDEX Transactions2 ON Transactions (EffectiveTicket); + +# }}} + +# {{{ Scrips + +CREATE TABLE rt3.Scrips ( + id numeric(38,0) identity, + Description varchar(255), + ScripCondition integer NOT NULL , + ScripAction integer NOT NULL , + ConditionRules text NULL , + ActionRules text NULL , + CustomIsApplicableCode text NULL , + CustomPrepareCode text NULL , + CustomCommitCode text NULL , + Stage varchar(32) NULL , + Queue integer NOT NULL , + Template integer NOT NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +# }}} + +# {{{ ACL +CREATE TABLE rt3.ACL ( + id numeric(38,0) identity, + PrincipalType varchar(25) NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor", "Requestor" + + PrincipalId integer NOT NULL , #Foreign key to principals + RightName varchar(25) NOT NULL , + ObjectType varchar(25) NOT NULL , + ObjectId integer NOT NULL , + DelegatedBy integer NOT NULL , #foreign key to principals with a userid + DelegatedFrom integer NOT NULL , #foreign key to ACL + PRIMARY KEY (id) +) ; + +CREATE INDEX ACL1 on ACL(RightName, ObjectType, ObjectId,PrincipalType,PrincipalId); + +# }}} + +# {{{ GroupMembers + +CREATE TABLE rt3.GroupMembers ( + id numeric(38,0) identity, + GroupId integer NOT NULL , + MemberId integer NOT NULL , #Foreign key to Principals + PRIMARY KEY (id) +) ; +CREATE UNIQUE INDEX GroupMembers1 on GroupMembers (GroupId, MemberId); + + +# }}} + +# {{{ GroupMembersCache + +CREATE TABLE rt3.CachedGroupMembers ( + id numeric(38,0) identity, + GroupId int, # foreign key to Principals + MemberId int, # foreign key to Principals + Via int, #foreign key to CachedGroupMembers. (may point to $self->id) + ImmediateParentId int, #foreign key to prinicpals. + # this points to the group that the member is + # a member of, for ease of deletes. + Disabled numeric(1) NOT NULL , # if this cached group member is a member of this group by way of a disabled + # group or this group is disabled, this will be set to 1 + # this allows us to not find members of disabled subgroups when listing off + # group members recursively. + # Also, this allows us to have the ACL system elide members of disabled groups + PRIMARY KEY (id) +) ; + +CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled); +CREATE INDEX GrouMem on CachedGroupMembers (GroupId,MemberId); + +# }}} + +# {{{ Users + +CREATE TABLE rt3.Users ( + id numeric(38,0) identity, + Name varchar(200) NOT NULL , + Password varchar(40) NULL , + Comments text NULL , + Signature text NULL , + EmailAddress varchar(120) NULL , + FreeformContactInfo text NULL , + Organization varchar(200) NULL , + 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 , + AuthSystem varchar(30) NULL , + Gecos varchar(16) NULL , + HomePhone varchar(30) NULL , + WorkPhone varchar(30) NULL , + MobilePhone varchar(30) NULL , + PagerPhone varchar(30) NULL , + Address1 varchar(200) NULL , + Address2 varchar(200) NULL , + City varchar(100) NULL , + State varchar(100) NULL , + Zip varchar(16) NULL , + Country varchar(50) NULL , + Timezone varchar(50) NULL , + PGPKey text NULL, + + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + + +CREATE UNIQUE INDEX Users1 ON Users (Name) ; +CREATE INDEX Users2 ON Users (Name); +CREATE INDEX Users3 ON Users (id, EmailAddress); +CREATE INDEX Users4 ON Users (EmailAddress); + + +# }}} + +# {{{ Tickets + +CREATE TABLE rt3.Tickets ( + id numeric(38,0) identity, + EffectiveId integer NOT NULL , + Queue integer NOT NULL , + Type varchar(16) NULL , + IssueStatement integer NOT NULL , + Resolution integer NOT NULL , + Owner integer NOT NULL , + Subject varchar(200) NULL, + InitialPriority integer NOT NULL , + FinalPriority integer NOT NULL , + Priority integer NOT NULL , + TimeEstimated integer NOT NULL , + TimeWorked integer NOT NULL , + Status varchar(10) NULL , + TimeLeft integer NOT NULL , + Told DATETIME NULL , + Starts DATETIME NULL , + Started DATETIME NULL , + Due DATETIME NULL , + Resolved DATETIME NULL , + + + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + Disabled numeric(1) NOT NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX Tickets1 ON Tickets (Queue, Status) ; +CREATE INDEX Tickets2 ON Tickets (Owner) ; +CREATE INDEX Tickets3 ON Tickets (EffectiveId) ; +CREATE INDEX Tickets4 ON Tickets (id, Status) ; +CREATE INDEX Tickets5 ON Tickets (id, EffectiveId) ; +CREATE INDEX Tickets6 ON Tickets (EffectiveId, Type) ; + +# }}} + +# {{{ ScripActions + +CREATE TABLE rt3.ScripActions ( + id numeric(38,0) identity, + Name varchar(200) NULL , + Description varchar(255) NULL , + ExecModule varchar(60) NULL , + Argument varchar(255) NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +# }}} + +# {{{ Templates + +CREATE TABLE rt3.Templates ( + id numeric(38,0) identity, + Queue integer NOT NULL , + Name varchar(200) NOT NULL , + Description varchar(255) NULL , + Type varchar(16) NULL , + Language varchar(16) NULL , + TranslationOf integer NOT NULL , + Content text NULL , + LastUpdated DATETIME NULL , + LastUpdatedBy integer NOT NULL , + Creator integer NOT NULL , + Created DATETIME NULL , + PRIMARY KEY (id) +) ; + +# }}} + +# {{{ TicketCustomFieldValues + +CREATE TABLE rt3.TicketCustomFieldValues ( + id numeric(38,0) identity, + Ticket int NOT NULL , + CustomField int NOT NULL , + Content varchar(255) NULL , + + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX TicketCustomFieldValues1 ON TicketCustomFieldValues (CustomField,Ticket,Content); +CREATE INDEX TicketCustomFieldValues2 ON TicketCustomFieldValues (CustomField,Ticket); + +# }}} + +# {{{ CustomFields + +CREATE TABLE rt3.CustomFields ( + id numeric(38,0) identity, + Name varchar(200) NULL , + Type varchar(200) NULL , + Queue integer NOT NULL , + Description varchar(255) NULL , + SortOrder integer NOT NULL , + + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + Disabled numeric(1) NOT NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX CustomFields1 on CustomFields (Disabled, Queue); + + +# }}} + +# {{{ CustomFieldValues + +CREATE TABLE rt3.CustomFieldValues ( + id numeric(38,0) identity, + CustomField int NOT NULL , + Name varchar(200) NULL , + Description varchar(255) NULL , + SortOrder integer NOT NULL , + + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField); + +# }}} + + +# {{{ Attributes + +CREATE TABLE rt3.Attributes ( + id numeric(38,0) identity, + Name varchar(255) NULL , + Description varchar(255) NULL , + Content text, + ContentType varchar(16), + ObjectType varchar(64), + ObjectId integer, # foreign key to anything + Creator integer NOT NULL , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) ; + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + +# }}} + +# {{{ Sessions + +# sessions is used by Apache::Session to keep sessions in the database. +# We should have a reaper script somewhere. + +CREATE TABLE rt3.sessions ( + id char(32) NOT NULL, + a_session TEXT, + LastUpdated DATETIME, + PRIMARY KEY (id) +); + +# }}} diff --git a/rt/etc/upgrade/3.1.0/acl.Informix b/rt/etc/upgrade/3.1.0/acl.Informix new file mode 100644 index 000000000..73c16ae03 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/acl.Informix @@ -0,0 +1,4 @@ +sub acl { + return (); +} +1; diff --git a/rt/etc/upgrade/3.1.0/acl.Oracle b/rt/etc/upgrade/3.1.0/acl.Oracle new file mode 100755 index 000000000..73c16ae03 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/acl.Oracle @@ -0,0 +1,4 @@ +sub acl { + return (); +} +1; diff --git a/rt/etc/upgrade/3.1.0/acl.Pg b/rt/etc/upgrade/3.1.0/acl.Pg new file mode 100755 index 000000000..809e99ab3 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/acl.Pg @@ -0,0 +1,19 @@ +sub acl { + my $dbh = shift; + + my @acls; + + my @tables = qw ( + attributes_id_seq + attributes + ); + + foreach my $table (@tables) { + push @acls, + "GRANT SELECT, INSERT, UPDATE, DELETE ON $table to " + . $RT::DatabaseUser . ";"; + + } + return (@acls); +} +1; diff --git a/rt/etc/upgrade/3.1.0/acl.SQLite b/rt/etc/upgrade/3.1.0/acl.SQLite new file mode 100755 index 000000000..73c16ae03 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/acl.SQLite @@ -0,0 +1,4 @@ +sub acl { + return (); +} +1; diff --git a/rt/etc/upgrade/3.1.0/acl.mysql b/rt/etc/upgrade/3.1.0/acl.mysql new file mode 100755 index 000000000..73c16ae03 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/acl.mysql @@ -0,0 +1,4 @@ +sub acl { + return (); +} +1; diff --git a/rt/etc/upgrade/3.1.0/content b/rt/etc/upgrade/3.1.0/content new file mode 100644 index 000000000..3117dafc5 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/content @@ -0,0 +1,2 @@ +# nothing to do +1; diff --git a/rt/etc/upgrade/3.1.0/schema.Informix b/rt/etc/upgrade/3.1.0/schema.Informix new file mode 100644 index 000000000..722eb70b3 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/schema.Informix @@ -0,0 +1,17 @@ +CREATE TABLE Attributes ( + id SERIAL, + Name VARCHAR(255) DEFAULT '' NOT NULL, + Description VARCHAR(255) DEFAULT NULL, + Content BYTE, + ContentType VARCHAR(16), + ObjectType VARCHAR(25) NOT NULL, + ObjectId INTEGER DEFAULT 0 NOT NULL, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + LastUpdatedBy INTEGER DEFAULT 0 NOT NULL, + LastUpdated DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); diff --git a/rt/etc/upgrade/3.1.0/schema.Oracle b/rt/etc/upgrade/3.1.0/schema.Oracle new file mode 100644 index 000000000..a8aae18b5 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/schema.Oracle @@ -0,0 +1,17 @@ +CREATE SEQUENCE ATTRIBUTES_seq; +CREATE TABLE Attributes ( + id NUMBER(11,0) PRIMARY KEY, + Name VARCHAR2(255) NOT NULL, + Description VARCHAR2(255), + Content CLOB, + ContentType VARCHAR(16), + ObjectType VARCHAR2(25) NOT NULL, + ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL, + Creator NUMBER(11,0) DEFAULT 0 NOT NULL, + Created DATE, + LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, + LastUpdated DATE +); + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); diff --git a/rt/etc/upgrade/3.1.0/schema.Pg b/rt/etc/upgrade/3.1.0/schema.Pg new file mode 100755 index 000000000..67ea73827 --- /dev/null +++ b/rt/etc/upgrade/3.1.0/schema.Pg @@ -0,0 +1,25 @@ +-- {{{ Attributes + +CREATE SEQUENCE attributes_id_seq; + +CREATE TABLE Attributes ( + id INTEGER DEFAULT nextval('attributes_id_seq'), + Name varchar(255) NOT NULL , + Description varchar(255) NULL , + Content text, + ContentType varchar(16), + ObjectType varchar(64), + ObjectId integer, -- foreign key to anything + Creator integer NOT NULL DEFAULT 0 , + Created TIMESTAMP NULL , + LastUpdatedBy integer NOT NULL DEFAULT 0 , + LastUpdated TIMESTAMP NULL , + PRIMARY KEY (id) + +); + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + +-- }}} + diff --git a/rt/etc/upgrade/3.1.0/schema.SQLite b/rt/etc/upgrade/3.1.0/schema.SQLite new file mode 100644 index 000000000..87a1cc47f --- /dev/null +++ b/rt/etc/upgrade/3.1.0/schema.SQLite @@ -0,0 +1,20 @@ +--- {{{ Attributes +CREATE TABLE Attributes ( + id INTEGER PRIMARY KEY , + Name varchar(255) NOT NULL , + Description varchar(255) NULL , + Content LONGTEXT NULL , + ContentType varchar(16), + ObjectType varchar(25) NOT NULL , + ObjectId INTEGER default 0, + Creator integer NULL , + Created DATETIME NULL , + LastUpdatedBy integer NULL , + LastUpdated DATETIME NULL + +) ; +CREATE INDEX Attributes1 on Attributes(Name) +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + +--- }}} + diff --git a/rt/etc/upgrade/3.1.0/schema.mysql b/rt/etc/upgrade/3.1.0/schema.mysql new file mode 100755 index 000000000..c4a345d3e --- /dev/null +++ b/rt/etc/upgrade/3.1.0/schema.mysql @@ -0,0 +1,21 @@ +# {{{ Attributes + +CREATE TABLE Attributes ( + id INTEGER NOT NULL AUTO_INCREMENT, + Name varchar(255) NULL , + Description varchar(255) NULL , + Content text, + ContentType varchar(16), + ObjectType varchar(64), + ObjectId integer, # foreign key to anything + Creator integer NOT NULL DEFAULT 0 , + Created DATETIME NULL , + LastUpdatedBy integer NOT NULL DEFAULT 0 , + LastUpdated DATETIME NULL , + PRIMARY KEY (id) +) TYPE=InnoDB; + +CREATE INDEX Attributes1 on Attributes(Name); +CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); + +# }}} diff --git a/rt/etc/upgrade/3.1.15/content b/rt/etc/upgrade/3.1.15/content new file mode 100644 index 000000000..d23125a0b --- /dev/null +++ b/rt/etc/upgrade/3.1.15/content @@ -0,0 +1,7 @@ +@Scrips = ( + { ScripCondition => 'On Owner Change', + ScripAction => 'Notify Owner', + Template => 'Transaction' }, +); + +1; diff --git a/rt/etc/upgrade/3.1.17/content b/rt/etc/upgrade/3.1.17/content new file mode 100644 index 000000000..1d648d82f --- /dev/null +++ b/rt/etc/upgrade/3.1.17/content @@ -0,0 +1,22 @@ +@ScripActions = ( + { Name => 'Notify Ccs as Comment', # loc + Description => 'Sends mail to the Ccs as a comment', # loc + ExecModule => 'NotifyAsComment', + Argument => 'Cc' }, + { Name => 'Notify Ccs', # loc + Description => 'Sends mail to the Ccs', # loc + ExecModule => 'Notify', + Argument => 'Cc' }, +); + + +@ScripConditions = ( + { + Name => 'On Priority Change', # loc + Description => 'Whenever a ticket\'s priority changes', # loc + ApplicableTransTypes => 'Set', + ExecModule => 'PriorityChange', + }, +); + +1; |