diff options
author | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
commit | eb9668a6f3181ee02cb335272c5ee4616e61fd09 (patch) | |
tree | f5a22d9141723fd9e2fdb40430e4a38743b72604 /rt/etc | |
parent | 25953817e61fd252c18241699c0b6cdc3fa54121 (diff) | |
parent | 289340780927b5bac2c7604d7317c3063c6dd8cc (diff) |
This commit was generated by cvs2svn to compensate for changes in r3241,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/etc')
-rw-r--r-- | rt/etc/RT_Config.pm | 37 | ||||
-rw-r--r-- | rt/etc/RT_Config.pm.in | 37 | ||||
-rw-r--r-- | rt/etc/acl.Informix | 5 | ||||
-rw-r--r-- | rt/etc/constraints.mysql | 14 | ||||
-rw-r--r-- | rt/etc/drop.Informix | 19 | ||||
-rw-r--r-- | rt/etc/drop.Oracle | 37 | ||||
-rw-r--r-- | rt/etc/initialdata | 4 | ||||
-rw-r--r-- | rt/etc/schema.Informix | 342 | ||||
-rw-r--r-- | rt/etc/schema.SQLite | 10 |
9 files changed, 477 insertions, 28 deletions
diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm index 2b3f4f9fe..5386a8e05 100644 --- a/rt/etc/RT_Config.pm +++ b/rt/etc/RT_Config.pm @@ -47,7 +47,7 @@ Set($Timezone , 'US/Eastern'); # {{{ Database Configuration # Database driver beeing used. Case matters -# Valid types are "mysql" and "Pg" +# Valid types are "mysql", "Oracle" and "Pg" Set($DatabaseType , 'mysql'); @@ -164,9 +164,9 @@ Set($SenderMustExistInExternalDatabase , undef); # and comment mail tracked by RT, unless overridden by a queue-specific # address. -Set($CorrespondAddress , 'RT::CorrespondAddress.not.set'); +Set($CorrespondAddress , 'RT_CorrespondAddressNotSet'); -Set($CommentAddress , 'RT::CommentAddress.not.set'); +Set($CommentAddress , 'RT_CommentAddressNotSet'); #Sendmail Configuration @@ -268,9 +268,6 @@ Set($WebBaseURL , "http://RT::WebBaseURL.not.configured:80"); Set($WebURL , $WebBaseURL . $WebPath . "/"); # $WebImagesURL points to the base URL where RT can find its images. -# If you're running the FastCGI version of the RT web interface, -# you should make RT's WebRT/html/NoAuth/images directory available on -# a static web server and supply that URL as $WebImagesURL. Set($WebImagesURL , $WebURL . "NoAuth/images/"); @@ -278,6 +275,15 @@ Set($WebImagesURL , $WebURL . "NoAuth/images/"); Set($LogoURL , $WebImagesURL . "rt.jpg"); +# For message boxes, set the entry box width and what type of wrapping +# to use. +# +# Default width: 72 +Set($MessageBoxWidth , 72); + +# Default wrapping: "HARD" (choices "SOFT", "HARD") +Set($MessageBoxWrap, "HARD"); + # if TrustHTMLAttachments is not defined, we will display them # as text. This prevents malicious HTML and javascript from being # sent in a request (although there is probably more to it than that) @@ -310,6 +316,25 @@ Set($WebExternalAuto , undef); # Set($WebSessionClass , 'Apache::Session::File'); +# $MaxInlineBody is the maximum attachment size that we want to see +# inline when viewing a transaction. 13456 is a random sane-sounding +# default. + +Set($MaxInlineBody, 13456); + +# $MyTicketsLength is the length of the table on the front page. +# For some people, the default of 10 isn't big enough to get a feel for +# how much work needs to be done before you get some time off. + +Set($MyTicketsLength, 10); + +# @MasonParameters is the list of parameters for the constructor of +# HTML::Mason's Apache or CGI Handler. This is normally only useful +# for debugging, eg. profiling individual components with +# (preamble => 'my $p = MasonX::Profiler->new($m, $r);'); + +@MasonParameters = () unless (@MasonParameters); + # }}} # {{{ RT UTF-8 Settings diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index 5f97eb0a0..8271a7760 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -47,7 +47,7 @@ Set($Timezone , 'US/Eastern'); # {{{ Database Configuration # Database driver beeing used. Case matters -# Valid types are "mysql" and "Pg" +# Valid types are "mysql", "Oracle" and "Pg" Set($DatabaseType , '@DB_TYPE@'); @@ -164,9 +164,9 @@ Set($SenderMustExistInExternalDatabase , undef); # and comment mail tracked by RT, unless overridden by a queue-specific # address. -Set($CorrespondAddress , 'RT::CorrespondAddress.not.set'); +Set($CorrespondAddress , 'RT_CorrespondAddressNotSet'); -Set($CommentAddress , 'RT::CommentAddress.not.set'); +Set($CommentAddress , 'RT_CommentAddressNotSet'); #Sendmail Configuration @@ -268,9 +268,6 @@ Set($WebBaseURL , "http://RT::WebBaseURL.not.configured:80"); Set($WebURL , $WebBaseURL . $WebPath . "/"); # $WebImagesURL points to the base URL where RT can find its images. -# If you're running the FastCGI version of the RT web interface, -# you should make RT's WebRT/html/NoAuth/images directory available on -# a static web server and supply that URL as $WebImagesURL. Set($WebImagesURL , $WebURL . "NoAuth/images/"); @@ -278,6 +275,15 @@ Set($WebImagesURL , $WebURL . "NoAuth/images/"); Set($LogoURL , $WebImagesURL . "rt.jpg"); +# For message boxes, set the entry box width and what type of wrapping +# to use. +# +# Default width: 72 +Set($MessageBoxWidth , 72); + +# Default wrapping: "HARD" (choices "SOFT", "HARD") +Set($MessageBoxWrap, "HARD"); + # if TrustHTMLAttachments is not defined, we will display them # as text. This prevents malicious HTML and javascript from being # sent in a request (although there is probably more to it than that) @@ -310,6 +316,25 @@ Set($WebExternalAuto , undef); # Set($WebSessionClass , 'Apache::Session::File'); +# $MaxInlineBody is the maximum attachment size that we want to see +# inline when viewing a transaction. 13456 is a random sane-sounding +# default. + +Set($MaxInlineBody, 13456); + +# $MyTicketsLength is the length of the table on the front page. +# For some people, the default of 10 isn't big enough to get a feel for +# how much work needs to be done before you get some time off. + +Set($MyTicketsLength, 10); + +# @MasonParameters is the list of parameters for the constructor of +# HTML::Mason's Apache or CGI Handler. This is normally only useful +# for debugging, eg. profiling individual components with +# (preamble => 'my $p = MasonX::Profiler->new($m, $r);'); + +@MasonParameters = () unless (@MasonParameters); + # }}} # {{{ RT UTF-8 Settings diff --git a/rt/etc/acl.Informix b/rt/etc/acl.Informix new file mode 100644 index 000000000..bca0408dd --- /dev/null +++ b/rt/etc/acl.Informix @@ -0,0 +1,5 @@ +sub acl { +return ( +"GRANT RESOURCE TO ${RT::DatabaseUser};"); +} +1; diff --git a/rt/etc/constraints.mysql b/rt/etc/constraints.mysql index 33a037673..fd557d5e4 100644 --- a/rt/etc/constraints.mysql +++ b/rt/etc/constraints.mysql @@ -1,8 +1,5 @@ -#ALTER TABLE Users ADD FOREIGN KEY (Creator) REFERENCES Users(id); -#ALTER TABLE Users ADD FOREIGN KEY (LastUpdatedBy) REFERENCES Users(id); ALTER TABLE Links ADD FOREIGN KEY (LocalBase) REFERENCES Tickets(id) ; ALTER TABLE Links ADD FOREIGN KEY (LocalTarget) REFERENCES Tickets(id); - ObjectId integer, # FOREIGN KEY to Users or Groups, depending ALTER TABLE Tickets ADD FOREIGN KEY (Queue) REFERENCES Queues(id); ALTER TABLE Tickets ADD FOREIGN KEY (EffectiveId) REFERENCES Tickets(id); ALTER TABLE Tickets ADD FOREIGN KEY (Owner) REFERENCES Principals(id); @@ -19,18 +16,11 @@ 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); - PrincipalId integer NOT NULL , #ALTER TABLE ADD FOREIGN KEY to principals - DelegatedBy integer NOT NULL default 0, #ALTER TABLE ADD FOREIGN KEY to principals with a userid - DelegatedFrom integer NOT NULL default 0, #ALTER TABLE ADD FOREIGN KEY to ACL 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 FOREIGN KEY (GroupId) REFERENCES Principals(id); + ALTER TABLE GroupMembers ADD FOREIGN KEY (GroupId) REFERENCES Groups(id); ALTER TABLE GroupMembers ADD FOREIGN KEY (MemberId) REFERENCES Principals(id); - GroupId int, # ALTER TABLE ADD FOREIGN KEY to Principals - MemberId int, # ALTER TABLE ADD FOREIGN KEY to Principals - Via int, #ALTER TABLE ADD FOREIGN KEY to CachedGroupMembers. (may point to $self->id) - ImmediateParentId int, #ALTER TABLE ADD FOREIGN KEY to prinicpals. 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); @@ -43,7 +33,7 @@ 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 FOREIGN KEY (Ticket) REFERENCES Ticketss(id); + 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); diff --git a/rt/etc/drop.Informix b/rt/etc/drop.Informix new file mode 100644 index 000000000..ce7cc0181 --- /dev/null +++ b/rt/etc/drop.Informix @@ -0,0 +1,19 @@ +DROP TABLE ACL; +DROP TABLE ATTACHMENTS; +DROP TABLE CACHEDGROUPMEMBERS; +DROP TABLE CUSTOMFIELDS; +DROP TABLE CUSTOMFIELDVALUES; +DROP TABLE GROUPMEMBERS; +DROP TABLE GROUPS; +DROP TABLE LINKS; +DROP TABLE PRINCIPALS; +DROP TABLE QUEUES; +DROP TABLE SCRIPACTIONS; +DROP TABLE SCRIPCONDITIONS; +DROP TABLE SCRIPS; +DROP TABLE SESSIONS; +DROP TABLE TEMPLATES; +DROP TABLE TICKETCUSTOMFIELDVALUES; +DROP TABLE TICKETS; +DROP TABLE TRANSACTIONS; +DROP TABLE USERS; diff --git a/rt/etc/drop.Oracle b/rt/etc/drop.Oracle new file mode 100644 index 000000000..dd11376f2 --- /dev/null +++ b/rt/etc/drop.Oracle @@ -0,0 +1,37 @@ +DROP TABLE ACL; +DROP TABLE ATTACHMENTS; +DROP TABLE CACHEDGROUPMEMBERS; +DROP TABLE CUSTOMFIELDS; +DROP TABLE CUSTOMFIELDVALUES; +DROP TABLE GROUPMEMBERS; +DROP TABLE GROUPS; +DROP TABLE LINKS; +DROP TABLE PRINCIPALS; +DROP TABLE QUEUES; +DROP TABLE SCRIPACTIONS; +DROP TABLE SCRIPCONDITIONS; +DROP TABLE SCRIPS; +DROP TABLE SESSIONS; +DROP TABLE TEMPLATES; +DROP TABLE TICKETCUSTOMFIELDVALUES; +DROP TABLE TICKETS; +DROP TABLE TRANSACTIONS; +DROP TABLE USERS; +DROP SEQUENCE ACL_seq; +DROP SEQUENCE ATTACHMENTS_seq; +DROP SEQUENCE CACHEDGROUPMEMBERS_seq; +DROP SEQUENCE CUSTOMFIELDS_seq; +DROP SEQUENCE CUSTOMFIELDVALUES_seq; +DROP SEQUENCE GROUPMEMBERS_seq; +DROP SEQUENCE GROUPS_seq; +DROP SEQUENCE LINKS_seq; +DROP SEQUENCE PRINCIPALS_seq; +DROP SEQUENCE QUEUES_seq; +DROP SEQUENCE SCRIPACTIONS_seq; +DROP SEQUENCE SCRIPCONDITIONS_seq; +DROP SEQUENCE SCRIPS_seq; +DROP SEQUENCE TEMPLATES_seq; +DROP SEQUENCE TICKETCUSTOMFIELDVALUES_seq; +DROP SEQUENCE TICKETS_seq; +DROP SEQUENCE TRANSACTIONS_seq; +DROP SEQUENCE USERS_seq; diff --git a/rt/etc/initialdata b/rt/etc/initialdata index 62b35ace2..e360c5daf 100644 --- a/rt/etc/initialdata +++ b/rt/etc/initialdata @@ -307,7 +307,7 @@ This is a comment. It is not sent to the Requestor(s): Queue => '0', Name => 'Resolved', # loc Description => 'Ticket Resolved', # loc - Content => 'Subject: Ticket Resolved + Content => 'Subject: Resolved: {$Ticket->Subject} According to our records, your request has been resolved. If you have any further questions or concerns, please respond to this message. @@ -551,7 +551,7 @@ while (my $link = $links->Next) { require RT::Action::Notify; bless($self, 'RT::Action::Notify'); $self->{Argument} = 'Requestor'; $self->Prepare; -return $passed; +return 0; # ignore $passed; # ------------------------------------------------------------------- # ], CustomCommitCode => '"never needed"', diff --git a/rt/etc/schema.Informix b/rt/etc/schema.Informix new file mode 100644 index 000000000..ca6173f36 --- /dev/null +++ b/rt/etc/schema.Informix @@ -0,0 +1,342 @@ +-- This schema was adopted from the oracle schema by +-- Andre Koppel. +-- Version 0.2 Date 2003.10.21 +-- The work is still in progress + +CREATE TABLE Attachments ( + id SERIAL, + TransactionId INTEGER NOT NULL, + Parent INTEGER DEFAULT 0 NOT NULL, + MessageId VARCHAR(160), + Subject VARCHAR(255), + Filename VARCHAR(255), + ContentType VARCHAR(80), + ContentEncoding VARCHAR(80), + Content BYTE, + Headers BYTE, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); +CREATE INDEX Attachments1 ON Attachments (Parent); +CREATE INDEX Attachments2 ON Attachments (TransactionId); +CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId); + + +CREATE TABLE Queues ( + id SERIAL, + Name VARCHAR(200) DEFAULT '' NOT NULL, + Description VARCHAR(255) DEFAULT NULL, + CorrespondAddress VARCHAR(120) DEFAULT NULL, + CommentAddress VARCHAR(120) DEFAULT NULL, + InitialPriority INTEGER DEFAULT 0 NOT NULL, + FinalPriority INTEGER DEFAULT 0 NOT NULL, + DefaultDueIn 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, + Disabled INTEGER DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE UNIQUE INDEX Queues1 ON Queues (Name); +CREATE INDEX Queues2 ON Queues (Disabled); + + +CREATE TABLE Links ( + id SERIAL, + Base VARCHAR(240) DEFAULT NULL, + Target VARCHAR(240) DEFAULT NULL, + Type VARCHAR(20) DEFAULT '' NOT NULL, + LocalTarget INTEGER DEFAULT 0 NOT NULL, + LocalBase INTEGER DEFAULT 0 NOT NULL, + LastUpdatedBy INTEGER DEFAULT 0 NOT NULL, + LastUpdated DATETIME YEAR TO SECOND, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + 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); + + +CREATE TABLE Principals ( + id SERIAL, + PrincipalType VARCHAR(16) DEFAULT '' NOT NULL, + ObjectId INTEGER DEFAULT 0, + Disabled INTEGER DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE INDEX Principals2 ON Principals (ObjectId); + + +CREATE TABLE Groups ( + id SERIAL, + Name VARCHAR(200) DEFAULT NULL, + Description VARCHAR(255) DEFAULT NULL, + Domain VARCHAR(64) DEFAULT '', + Type VARCHAR(64) DEFAULT '', + Instance INTEGER DEFAULT 0 NOT NULL, +-- Instance VARCHAR(64) DEFAULT '' NOT NULL, + PRIMARY KEY (id) +); +CREATE INDEX Groups1 ON Groups (Domain, Instance, Type, id); +CREATE INDEX Groups2 ON Groups (Type, Instance, Domain); + + +CREATE TABLE ScripConditions ( + id SERIAL, + Name VARCHAR(200), + Description VARCHAR(255), + ExecModule VARCHAR(60), + Argument VARCHAR(255), + ApplicableTransTypes VARCHAR(60), + 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 TABLE Transactions ( + id SERIAL, + EffectiveTicket INTEGER DEFAULT 0 NOT NULL, + Ticket INTEGER DEFAULT 0 NOT NULL, + TimeTaken INTEGER DEFAULT 0 NOT NULL, + Type VARCHAR(20), + Field VARCHAR(40), + OldValue VARCHAR(255), + NewValue VARCHAR(255), + Data VARCHAR(255), + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); +CREATE INDEX Transactions1 ON Transactions (Ticket); +CREATE INDEX Transactions2 ON Transactions (EffectiveTicket); + + +CREATE TABLE Scrips ( + id SERIAL, + Description VARCHAR(255) DEFAULT '', + ScripCondition INTEGER DEFAULT 0 NOT NULL, + ScripAction INTEGER DEFAULT 0 NOT NULL, + ConditionRules BYTE, + ActionRules BYTE, + CustomIsApplicableCode BYTE, + CustomPrepareCode BYTE, + CustomCommitCode BYTE, + Stage VARCHAR(32), + Queue INTEGER DEFAULT 0 NOT NULL, + Template 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 TABLE ACL ( + id SERIAL, + PrincipalType VARCHAR(25) NOT NULL, + PrincipalId INTEGER NOT NULL, + RightName VARCHAR(25) NOT NULL, + ObjectType VARCHAR(25) NOT NULL, + ObjectId INTEGER DEFAULT 0 NOT NULL, + DelegatedBy INTEGER DEFAULT 0 NOT NULL, + DelegatedFrom INTEGER DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE INDEX ACL1 ON ACL(RightName, ObjectType, ObjectId, PrincipalType, PrincipalId); + + +CREATE TABLE GroupMembers ( + id SERIAL, + GroupId INTEGER DEFAULT 0 NOT NULL, + MemberId INTEGER DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, MemberId); + + +CREATE TABLE CachedGroupMembers ( + id SERIAL, + GroupId INTEGER DEFAULT 0, + MemberId INTEGER DEFAULT 0, + Via INTEGER DEFAULT 0, + ImmediateParentId INTEGER DEFAULT 0, + Disabled INTEGER DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE INDEX DisGrouMem ON CachedGroupMembers (GroupId, MemberId, Disabled); +CREATE INDEX GrouMem ON CachedGroupMembers (GroupId, MemberId); + + +CREATE TABLE Users ( + id SERIAL, + Name VARCHAR(200) NOT NULL, + Password VARCHAR(40), + Comments BYTE, + Signature BYTE, + EmailAddress VARCHAR(120), + FreeFormContactInfo BYTE, + Organization VARCHAR(200), + RealName VARCHAR(120), + NickName VARCHAR(16), + Lang VARCHAR(16), + EmailEncoding VARCHAR(16), + WebEncoding VARCHAR(16), + ExternalContactInfoId VARCHAR(100), + ContactInfoSystem VARCHAR(30), + ExternalAuthId VARCHAR(100), + AuthSystem VARCHAR(30), + Gecos VARCHAR(16), + HomePhone VARCHAR(30), + WorkPhone VARCHAR(30), + MobilePhone VARCHAR(30), + PagerPhone VARCHAR(30), + Address1 VARCHAR(200), + Address2 VARCHAR(200), + City VARCHAR(100), + State VARCHAR(100), + Zip VARCHAR(16), + Country VARCHAR(50), + Timezone VARCHAR(50), + PGPKey BYTE, + 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 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); + + +CREATE TABLE Tickets ( + id SERIAL, + EffectiveId INTEGER DEFAULT 0 NOT NULL, + Queue INTEGER DEFAULT 0 NOT NULL, + Type VARCHAR(16), + IssueStatement INTEGER DEFAULT 0 NOT NULL, + Resolution INTEGER DEFAULT 0 NOT NULL, + Owner INTEGER DEFAULT 0 NOT NULL, + Subject VARCHAR(200) DEFAULT '[no subject]', + InitialPriority INTEGER DEFAULT 0 NOT NULL, + FinalPriority INTEGER DEFAULT 0 NOT NULL, + Priority INTEGER DEFAULT 0 NOT NULL, + TimeEstimated INTEGER DEFAULT 0 NOT NULL, + TimeWorked INTEGER DEFAULT 0 NOT NULL, + Status VARCHAR(10), + TimeLeft INTEGER DEFAULT 0 NOT NULL, + Told DATETIME YEAR TO SECOND, + Starts DATETIME YEAR TO SECOND, + Started DATETIME YEAR TO SECOND, + Due DATETIME YEAR TO SECOND, + Resolved DATETIME YEAR TO SECOND, + LastUpdatedBy INTEGER DEFAULT 0 NOT NULL, + LastUpdated DATETIME YEAR TO SECOND, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + Disabled INTEGER DEFAULT 0 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); + + +CREATE TABLE ScripActions ( + id SERIAL, + Name VARCHAR(200), + Description VARCHAR(255), + ExecModule VARCHAR(60), + Argument VARCHAR(255), + 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 TABLE Templates ( + id SERIAL, + Queue INTEGER DEFAULT 0 NOT NULL, + Name VARCHAR(200) NOT NULL, + Description VARCHAR(255), + Type VARCHAR(16), + Language VARCHAR(16), + TranslationOf INTEGER DEFAULT 0 NOT NULL, + Content BYTE, + LastUpdated DATETIME YEAR TO SECOND, + LastUpdatedBy INTEGER DEFAULT 0 NOT NULL, + Creator INTEGER DEFAULT 0 NOT NULL, + Created DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); + + +CREATE TABLE TicketCustomFieldValues ( + id SERIAL, + Ticket INTEGER NOT NULL, + CustomField INTEGER NOT NULL, + Content VARCHAR(255), + 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 TicketCustomFieldValues1 ON TicketCustomFieldValues (CustomField,Ticket,Content); +CREATE INDEX TicketCustomFieldValues2 ON TicketCustomFieldValues (CustomField,Ticket); + +CREATE TABLE CustomFields ( + id SERIAL, + Name VARCHAR(200), + Type VARCHAR(200), + Queue INTEGER DEFAULT 0 NOT NULL, + Description VARCHAR(255), + SortOrder 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, + Disabled SMALLINT DEFAULT 0 NOT NULL, + PRIMARY KEY (id) +); +CREATE INDEX CustomFields1 ON CustomFields (Disabled, Queue); + + +CREATE TABLE CustomFieldValues ( + id SERIAL, + CustomField INTEGER NOT NULL, + Name VARCHAR(200), + Description VARCHAR(255), + SortOrder 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 CustomFieldValues1 ON CustomFieldValues (CustomField); + +CREATE TABLE sessions ( + id VARCHAR(32) NOT NULL, + a_session BYTE, + LastUpdated DATETIME YEAR TO SECOND, + PRIMARY KEY (id) +); + diff --git a/rt/etc/schema.SQLite b/rt/etc/schema.SQLite index f24bdbdc1..b10ff46d1 100644 --- a/rt/etc/schema.SQLite +++ b/rt/etc/schema.SQLite @@ -58,6 +58,7 @@ CREATE TABLE Links ( ) ; CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ; +CREATE INDEX Links4 ON Links(Type,LocalBase); --- }}} @@ -81,7 +82,7 @@ CREATE TABLE Groups ( Description varchar(255) NULL , Domain varchar(64), Type varchar(64), - Instance varchar(64) + Instance integer ) ; @@ -118,7 +119,7 @@ CREATE TABLE Transactions ( Field varchar(40) NULL , OldValue varchar(255) NULL , NewValue varchar(255) NULL , - Data varchar(100) NULL , + Data varchar(255) NULL , Creator integer NULL , Created DATETIME NULL @@ -343,6 +344,9 @@ CREATE TABLE TicketCustomFieldValues ( ) ; +CREATE INDEX TicketCustomFieldValues1 ON TicketCustomFieldValues (CustomField,Ticket,Content); +CREATE INDEX TicketCustomFieldValues2 ON TicketCustomFieldValues (CustomField,Ticket); + --- }}} --- {{{ CustomFields @@ -381,4 +385,6 @@ CREATE TABLE CustomFieldValues ( ) ; +CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField); + --- }}} |