--
------------------------------------------------------------------
+BEGIN;
+
+
--
Created TIMESTAMP NULL ,
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated TIMESTAMP NULL ,
- Disabled integer NOT NULL DEFAULT 0 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
);
CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ;
-CREATE INDEX Links4 ON Links(Type,LocalBase);
-- }}}
id INTEGER DEFAULT nextval('principals_id_seq') not null,
PrincipalType VARCHAR(16) not null,
ObjectId integer,
- Disabled integer NOT NULL DEFAULT 0 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
Description varchar(255) NULL ,
Domain varchar(64),
Type varchar(64),
- Instance integer,
+ Instance varchar(64),
PRIMARY KEY (id)
);
CREATE TABLE Transactions (
id INTEGER DEFAULT nextval('transactions_id_seq'),
- ObjectType varchar(255) NOT NULL ,
- ObjectId integer NOT NULL DEFAULT 0 ,
+ EffectiveTicket integer NOT NULL DEFAULT 0 ,
+ Ticket 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 ,
+ Data varchar(100) NULL ,
Creator integer NOT NULL DEFAULT 0 ,
Created TIMESTAMP NULL ,
PRIMARY KEY (id)
);
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
+CREATE INDEX Transactions1 ON Transactions (Ticket);
+CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
-- }}}
MemberId int,
Via int,
ImmediateParentId int,
- Disabled integer NOT NULL DEFAULT 0 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
LastUpdated TIMESTAMP NULL ,
Creator integer NOT NULL DEFAULT 0 ,
Created TIMESTAMP NULL ,
- Disabled integer NOT NULL DEFAULT 0 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
-- }}}
--- {{{ ObjectCustomFieldValues
+-- {{{ TicketCustomFieldValues
-- Sequences for table TICKETCUSTOMFIELDVALUES
--
-CREATE SEQUENCE objectcustomfieldvalues_id_s;
+CREATE SEQUENCE ticketcustomfieldvalues_id_s;
-CREATE TABLE ObjectCustomFieldValues (
- id INTEGER DEFAULT nextval('objectcustomfieldvalues_id_s'),
+CREATE TABLE TicketCustomFieldValues (
+ id INTEGER DEFAULT nextval('ticketcustomfieldvalues_id_s'),
+ Ticket int NOT NULL ,
CustomField int NOT NULL ,
- ObjectType varchar(255) NULL ,
- ObjectId int NOT NULL ,
- SortOrder integer NOT NULL DEFAULT 0 ,
-
Content varchar(255) NULL ,
- LargeContent text NULL,
- ContentType varchar(80) NULL,
- ContentEncoding varchar(80) NULL ,
Creator integer NOT NULL DEFAULT 0 ,
Created TIMESTAMP NULL ,
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated TIMESTAMP NULL ,
- Disabled integer NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
-CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId,Content);
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
-
-- }}}
-- {{{ CustomFields
id INTEGER DEFAULT nextval('customfields_id_seq'),
Name varchar(200) NULL ,
Type varchar(200) NULL ,
- MaxValues integer NOT NULL DEFAULT 0 ,
- Repeated integer NOT NULL DEFAULT 0 ,
- Pattern varchar(255) NULL ,
- LookupType varchar(255) NOT NULL ,
+ Queue integer NOT NULL DEFAULT 0 ,
Description varchar(255) NULL ,
SortOrder integer NOT NULL DEFAULT 0 ,
Created TIMESTAMP NULL ,
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated TIMESTAMP NULL ,
- Disabled integer 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 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
);
);
-CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField);
-
--- }}}
-
-
--- {{{ 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,
- 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);
-
-- }}}
-- {{{ Sessions
-- }}}
+
+
+COMMIT;