[rt-commit] [svn] r645 - in rt: . branches/rt-3.3/etc

autrijus at fsck.com autrijus at fsck.com
Wed Mar 31 01:20:11 EST 2004


Author: autrijus
Date: Wed Mar 31 01:20:10 2004
New Revision: 645

Modified:
   rt/   (props changed)
   rt/branches/rt-3.3/etc/schema.Informix
   rt/branches/rt-3.3/etc/schema.Oracle
   rt/branches/rt-3.3/etc/schema.Pg
   rt/branches/rt-3.3/etc/schema.SQLite
   rt/branches/rt-3.3/etc/schema.mysql
Log:
r3541 at not:  autrijus | 2004-03-31T06:19:36.740253Z

* port mysql schema to Pg.
* other database are partially ported -- OCF and OCFV currently not there


Modified: rt/branches/rt-3.3/etc/schema.Informix
==============================================================================
--- rt/branches/rt-3.3/etc/schema.Informix	(original)
+++ rt/branches/rt-3.3/etc/schema.Informix	Wed Mar 31 01:20:10 2004
@@ -103,20 +103,22 @@
 
 CREATE TABLE Transactions (
   	id 			SERIAL,
-  	EffectiveTicket 	INTEGER DEFAULT 0 NOT NULL,
-  	Ticket 			INTEGER DEFAULT 0 NOT NULL,
+  	ObjectType 		VARCHAR(255),
+  	ObjectId 		INTEGER DEFAULT 0 NOT NULL,
   	TimeTaken 		INTEGER DEFAULT 0 NOT NULL,
   	Type 			VARCHAR(20),
   	Field 			VARCHAR(40),
   	OldValue 		VARCHAR(255),
   	NewValue 		VARCHAR(255),
+  	ReferenceType 		VARCHAR(255),
+	OldReference		INTEGER DEFAULT 0,
+	NewReference		INTEGER DEFAULT 0,
   	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 INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
 
 
 CREATE TABLE Scrips (
@@ -305,7 +307,9 @@
 	id		SERIAL,
 	Name		VARCHAR(200),
 	Type		VARCHAR(200),
-	Queue		INTEGER DEFAULT 0 NOT NULL,
+	MaxValues	INTEGER DEFAULT 0 NOT NULL,
+	Pattern		VARCHAR(255),
+	LookupType	VARCHAR(255),
 	Description	VARCHAR(255),
 	SortOrder	INTEGER DEFAULT 0 NOT NULL,
 	Creator		INTEGER DEFAULT 0 NOT NULL,
@@ -315,7 +319,6 @@
 	Disabled	SMALLINT DEFAULT 0 NOT NULL,
         PRIMARY KEY (id)
 );
-CREATE INDEX CustomFields1 ON CustomFields (Disabled, Queue);
 
 
 CREATE TABLE CustomFieldValues (

Modified: rt/branches/rt-3.3/etc/schema.Oracle
==============================================================================
--- rt/branches/rt-3.3/etc/schema.Oracle	(original)
+++ rt/branches/rt-3.3/etc/schema.Oracle	Wed Mar 31 01:20:10 2004
@@ -105,19 +105,21 @@
 CREATE TABLE Transactions (
   	id 			NUMBER(11,0) 
 		CONSTRAINT Transactions_Key PRIMARY KEY,
-  	EffectiveTicket 	NUMBER(11,0) DEFAULT 0 NOT NULL,
-  	Ticket 			NUMBER(11,0) DEFAULT 0 NOT NULL,
+  	ObjectType 		VARCHAR2(255),
+  	ObjectId		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	TimeTaken 		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Type 			VARCHAR2(20),
   	Field 			VARCHAR2(40),
   	OldValue 		VARCHAR2(255),
   	NewValue 		VARCHAR2(255),
+  	ReferenceType 		VARCHAR2(255),
+  	OldReference 		NUMBER(11,0),
+  	NewReference 		NUMBER(11,0),
   	Data 			VARCHAR2(255),
   	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Created 		DATE
 );
-CREATE INDEX Transactions1 ON Transactions (Ticket);
-CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
+CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
 
 
 CREATE SEQUENCE SCRIPS_seq;
@@ -317,7 +319,9 @@
 		CONSTRAINT CustomFields_Key PRIMARY KEY,
 	Name		VARCHAR2(200),
 	Type		VARCHAR2(200),
-	Queue		NUMBER(11,0) DEFAULT 0 NOT NULL,
+	MaxValues	NUMBER(11,0) DEFAULT 0 NOT NULL,
+	Pattern		VARCHAR2(255),
+	LookupType	VARCHAR2(255),
 	Description	VARCHAR2(255),
 	SortOrder	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Creator		NUMBER(11,0) DEFAULT 0 NOT NULL,
@@ -326,7 +330,6 @@
 	LastUpdated	DATE,
 	Disabled	NUMBER(11,0) DEFAULT 0 NOT NULL
 );
-CREATE INDEX CustomFields1 ON CustomFields (Disabled, Queue);
 
 
 CREATE SEQUENCE CUSTOMFIELDVALUES_seq;

Modified: rt/branches/rt-3.3/etc/schema.Pg
==============================================================================
--- rt/branches/rt-3.3/etc/schema.Pg	(original)
+++ rt/branches/rt-3.3/etc/schema.Pg	Wed Mar 31 01:20:10 2004
@@ -183,13 +183,16 @@
 
 CREATE TABLE Transactions (
   id INTEGER DEFAULT nextval('transactions_id_seq'),
-  EffectiveTicket integer NOT NULL DEFAULT 0  ,
-  Ticket integer NOT NULL DEFAULT 0  ,
+  ObjectType varchar(255) NOT NULL  ,
+  ObjectId integer NOT NULL DEFAULT 0  ,
   TimeTaken integer NOT NULL DEFAULT 0  ,
   Type varchar(20) NULL  ,
   Field varchar(40) NULL  ,
   OldValue varchar(255) NULL  ,
   NewValue varchar(255) NULL  ,
+  ReferenceType varchar(255) NULL,
+  OldReference integer NULL  ,
+  NewReference integer NULL  ,
   Data varchar(255) NULL  ,
 
   Creator integer NOT NULL DEFAULT 0  ,
@@ -197,8 +200,7 @@
   PRIMARY KEY (id)
 
 );
-CREATE INDEX Transactions1 ON Transactions (Ticket);
-CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
+CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
 
 -- }}}
 
@@ -474,7 +476,7 @@
 
 -- }}}
 
--- {{{ TicketCustomFieldValues 
+-- {{{ ObjectCustomFieldValues 
 
 
 
@@ -482,13 +484,19 @@
 -- Sequences for table TICKETCUSTOMFIELDVALUES
 --
 
-CREATE SEQUENCE ticketcustomfieldvalues_id_s;
+CREATE SEQUENCE objectcustomfieldvalues_id_s;
 
-CREATE TABLE TicketCustomFieldValues (
-  id INTEGER DEFAULT nextval('ticketcustomfieldvalues_id_s'),
-  Ticket int NOT NULL  ,
+CREATE TABLE ObjectCustomFieldValues (
+  id INTEGER DEFAULT nextval('objectcustomfieldvalues_id_s'),
   CustomField int NOT NULL  ,
+  ObjectType varchar(255) NULL  ,
+  ObjectId int NOT NULL  ,
+
+  Current BOOL DEFAULT 1,
   Content varchar(255) NULL  ,
+  LargeContent text NULL,
+  ContentType varchar(80) NULL,
+  ContentEncoding varchar(80) NULL  ,
 
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
@@ -498,8 +506,8 @@
 
 );
 
-CREATE INDEX TicketCustomFieldValues1 ON TicketCustomFieldValues (CustomField,Ticket,Content); 
-CREATE INDEX TicketCustomFieldValues2 ON TicketCustomFieldValues (CustomField,Ticket); 
+CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId,Content); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId); 
 
 -- }}}
 
@@ -517,7 +525,9 @@
   id INTEGER DEFAULT nextval('customfields_id_seq'),
   Name varchar(200) NULL  ,
   Type varchar(200) NULL  ,
-  Queue integer NOT NULL DEFAULT 0 ,
+  MaxValues integer NOT NULL DEFAULT 0  ,
+  Pattern varchar(255) NULL  ,
+  LookupType varchar(255) NOT NULL  ,
   Description varchar(255) NULL  ,
   SortOrder integer NOT NULL DEFAULT 0  ,
 
@@ -526,6 +536,26 @@
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
   LastUpdated TIMESTAMP NULL  ,
   Disabled int2 NOT NULL DEFAULT 0 ,
+  PRIMARY KEY (id)
+
+);
+
+-- }}}
+
+-- {{{ ObjectCustomFields 
+
+CREATE SEQUENCE objectcustomfields_id_s;
+
+CREATE TABLE ObjectCustomFields (
+  id INTEGER DEFAULT nextval('objectcustomfields_id_s'),
+  CustomField integer NOT NULL,
+  ObjectId integer NOT NULL,
+  SortOrder integer NOT NULL DEFAULT 0  ,
+
+  Creator integer NOT NULL DEFAULT 0  ,
+  Created TIMESTAMP NULL  ,
+  LastUpdatedBy integer NOT NULL DEFAULT 0  ,
+  LastUpdated TIMESTAMP NULL  ,
   PRIMARY KEY (id)
 
 );

Modified: rt/branches/rt-3.3/etc/schema.SQLite
==============================================================================
--- rt/branches/rt-3.3/etc/schema.SQLite	(original)
+++ rt/branches/rt-3.3/etc/schema.SQLite	Wed Mar 31 01:20:10 2004
@@ -112,21 +112,23 @@
 --- {{{ Transactions
 CREATE TABLE Transactions (
   id INTEGER PRIMARY KEY  ,
-  EffectiveTicket integer NULL  ,
-  Ticket integer NULL  ,
+  ObjectType varchar(255) NULL  ,
+  ObjectId integer NULL  ,
   TimeTaken integer NULL  ,
   Type varchar(20) NULL  ,
   Field varchar(40) NULL  ,
   OldValue varchar(255) NULL  ,
   NewValue varchar(255) NULL  ,
+  ReferenceType varchar(255) NULL  ,
+  OldReference integer NULL  ,
+  NewReference integer NULL  ,
   Data varchar(255) NULL  ,
 
   Creator integer NULL  ,
   Created DATETIME NULL  
   
 ) ;
-CREATE INDEX Transactions1 ON Transactions (Ticket);
-CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
+CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
 
 --- }}}
 
@@ -355,7 +357,9 @@
   id INTEGER PRIMARY KEY  ,
   Name varchar(200) NULL  ,
   Type varchar(200) NULL  ,
-  Queue int NULL ,
+  MaxValues int NULL ,
+  Pattern varchar(255) NULL  ,
+  LookupType varchar(255) NULL  ,
   Description varchar(255) NULL  ,
   SortOrder integer NULL  ,
 

Modified: rt/branches/rt-3.3/etc/schema.mysql
==============================================================================
--- rt/branches/rt-3.3/etc/schema.mysql	(original)
+++ rt/branches/rt-3.3/etc/schema.mysql	Wed Mar 31 01:20:10 2004
@@ -135,7 +135,7 @@
   Created DATETIME NULL  ,
   PRIMARY KEY (id)
 ) TYPE=InnoDB;
-CREATE INDEX Transactions1 ON Transactions (ObjectId);
+CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
 
 # }}}
 
@@ -351,7 +351,7 @@
 CREATE TABLE ObjectCustomFieldValues (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   CustomField int NOT NULL  ,
-  ObjectType varchar(255) NOT NULL,		    # Final target of the Object
+  ObjectType varchar(255) NOT NULL,	    # Final target of the Object
   ObjectId int NOT NULL  ,		    # New -- Replaces Ticket
 
   Current BOOL DEFAULT 1,		    # New -- whether the value was current
@@ -367,8 +367,8 @@
   PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
-CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,ObjectId,Content); 
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectId); 
+CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId,Content); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId); 
 
 # }}}
 



More information about the Rt-commit mailing list