[Rt-commit] r11884 - in rt/branches/3.8-TESTING/etc: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Apr 24 21:56:17 EDT 2008
Author: ruz
Date: Thu Apr 24 21:56:17 2008
New Revision: 11884
Modified:
rt/branches/3.8-TESTING/etc/schema.mysql-4.1
rt/branches/3.8-TESTING/etc/upgrade/schema.mysql-4.0-4.1
Log:
* more cleanups on mysql schema vs. charsets, update upgrade script as well
Modified: rt/branches/3.8-TESTING/etc/schema.mysql-4.1
==============================================================================
--- rt/branches/3.8-TESTING/etc/schema.mysql-4.1 (original)
+++ rt/branches/3.8-TESTING/etc/schema.mysql-4.1 Thu Apr 24 21:56:17 2008
@@ -4,11 +4,11 @@
id INTEGER NOT NULL AUTO_INCREMENT,
TransactionId integer NOT NULL ,
Parent integer NOT NULL DEFAULT 0 ,
- MessageId varchar(160) NULL ,
+ MessageId varchar(160) CHARACTER SET ascii NULL ,
Subject varchar(255) NULL ,
Filename varchar(255) NULL ,
ContentType varchar(80) CHARACTER SET ascii NULL ,
- ContentEncoding varchar(80) NULL ,
+ ContentEncoding varchar(80) CHARACTER SET ascii NULL ,
Content LONGBLOB NULL ,
Headers LONGTEXT NULL ,
Creator integer NOT NULL DEFAULT 0 ,
@@ -47,8 +47,8 @@
CREATE TABLE Links (
id INTEGER NOT NULL AUTO_INCREMENT,
- Base varchar(240) CHARACTER SET ascii NULL,
- Target varchar(240) CHARACTER SET ascii NULL,
+ Base varchar(240) NULL,
+ Target varchar(240) NULL,
Type varchar(20) NOT NULL,
LocalTarget integer NOT NULL DEFAULT 0 ,
LocalBase integer NOT NULL DEFAULT 0 ,
@@ -57,7 +57,7 @@
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) TYPE=InnoDB CHARACTER SET utf8;
+) TYPE=InnoDB CHARACTER SET ascii;
CREATE INDEX Links2 ON Links (Base, Type) ;
CREATE INDEX Links3 ON Links (Target, Type) ;
@@ -85,8 +85,8 @@
id INTEGER NOT NULL AUTO_INCREMENT,
Name varchar(200) NULL ,
Description varchar(255) NULL ,
- Domain varchar(64),
- Type varchar(64),
+ Domain varchar(64) CHARACTER SET ascii NULL,
+ Type varchar(64) CHARACTER SET ascii NULL,
Instance integer,
PRIMARY KEY (id)
) TYPE=InnoDB CHARACTER SET utf8;
@@ -104,7 +104,7 @@
Description varchar(255) NULL ,
ExecModule varchar(60) CHARACTER SET ascii NULL,
Argument VARBINARY(255) NULL ,
- ApplicableTransTypes varchar(60) NULL ,
+ ApplicableTransTypes varchar(60) CHARACTER SET ascii NULL ,
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
@@ -151,7 +151,7 @@
CustomIsApplicableCode text NULL ,
CustomPrepareCode text NULL ,
CustomCommitCode text NULL ,
- Stage varchar(32) NULL ,
+ Stage varchar(32) CHARACTER SET ascii NULL ,
Queue integer NOT NULL DEFAULT 0 ,
Template integer NOT NULL DEFAULT 0 ,
Creator integer NOT NULL DEFAULT 0 ,
@@ -166,7 +166,7 @@
# {{{ ACL
CREATE TABLE ACL (
id INTEGER NOT NULL AUTO_INCREMENT,
- PrincipalType varchar(25) CHARACTER SET ascii NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor", "Requestor"
+ PrincipalType varchar(25) CHARACTER SET ascii NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor"
PrincipalId integer NOT NULL , #Foreign key to principals
RightName varchar(25) CHARACTER SET ascii NOT NULL,
@@ -184,7 +184,7 @@
# {{{ GroupMembers
CREATE TABLE GroupMembers (
- id INTEGER NOT NULL AUTO_INCREMENT,
+ id INTEGER NOT NULL AUTO_INCREMENT,
GroupId integer NOT NULL DEFAULT 0,
MemberId integer NOT NULL DEFAULT 0, #Foreign key to Principals
PRIMARY KEY (id)
@@ -270,7 +270,7 @@
id INTEGER NOT NULL AUTO_INCREMENT,
EffectiveId integer NOT NULL DEFAULT 0 ,
Queue integer NOT NULL DEFAULT 0 ,
- Type varchar(16) NULL ,
+ 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 ,
@@ -327,8 +327,8 @@
Queue integer NOT NULL DEFAULT 0 ,
Name varchar(200) NOT NULL ,
Description varchar(255) NULL ,
- Type varchar(16) NULL ,
- Language varchar(16) NULL ,
+ Type varchar(16) CHARACTER SET ascii NULL ,
+ Language varchar(16) CHARACTER SET ascii NULL ,
TranslationOf integer NOT NULL DEFAULT 0 ,
Content TEXT NULL ,
LastUpdated DATETIME NULL ,
@@ -351,8 +351,8 @@
Content varchar(255) NULL ,
LargeContent LONGBLOB NULL, # New -- to hold 255+ strings
- ContentType varchar(80) NULL, # New -- only text/* gets searched
- ContentEncoding varchar(80) NULL , # New -- for binary Content
+ ContentType varchar(80) CHARACTER SET ascii NULL, # New -- only text/* gets searched
+ ContentEncoding varchar(80) CHARACTER SET ascii NULL , # New -- for binary Content
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
@@ -372,7 +372,7 @@
CREATE TABLE CustomFields (
id INTEGER NOT NULL AUTO_INCREMENT,
Name varchar(200) NULL ,
- Type varchar(200) NULL , # Changed -- 'Single' and 'Multiple' is moved out
+ Type varchar(200) CHARACTER SET ascii NULL , # Changed -- 'Single' and 'Multiple' is moved out
MaxValues integer, # New -- was 'Single'(1) and 'Multiple'(0)
Pattern TEXT NULL , # New -- Must validate against this
Repeated int2 NOT NULL DEFAULT 0 , # New -- repeated table entry
@@ -394,7 +394,7 @@
CREATE TABLE ObjectCustomFields (
id INTEGER NOT NULL AUTO_INCREMENT,
- CustomField int NOT NULL ,
+ CustomField integer NOT NULL ,
ObjectId integer NOT NULL,
SortOrder integer NOT NULL DEFAULT 0 ,
@@ -435,7 +435,7 @@
Name varchar(255) NULL ,
Description varchar(255) NULL ,
Content BLOB,
- ContentType varchar(16),
+ ContentType varchar(16) CHARACTER SET ascii,
ObjectType varchar(64) CHARACTER SET ascii,
ObjectId integer, # foreign key to anything
Creator integer NOT NULL DEFAULT 0 ,
Modified: rt/branches/3.8-TESTING/etc/upgrade/schema.mysql-4.0-4.1
==============================================================================
--- rt/branches/3.8-TESTING/etc/upgrade/schema.mysql-4.0-4.1 (original)
+++ rt/branches/3.8-TESTING/etc/upgrade/schema.mysql-4.0-4.1 Thu Apr 24 21:56:17 2008
@@ -1,40 +1,57 @@
ALTER TABLE Attachments CHANGE ContentType ContentType VARCHAR(80) CHARACTER SET ascii NULL;
+ALTER TABLE Attachments CHANGE MessageId MessageId VARCHAR(160) CHARACTER SET ascii NULL;
ALTER TABLE Attachments CHANGE Content Content LONGBLOB NULL;
+ALTER TABLE Attachments CHANGE ContentEncoding ContentEncoding VARCHAR(160) CHARACTER SET ascii NULL;
-ALTER TABLE Queues CHANGE CorrespondAddress CorrespondAddress varchar(120) CHARACTER SET ascii NULL;
-ALTER TABLE Queues CHANGE CommentAddress CommentAddress varchar(120) CHARACTER SET ascii NULL;
+ALTER TABLE Queues CHANGE CorrespondAddress CorrespondAddress VARCHAR(120) CHARACTER SET ascii NULL;
+ALTER TABLE Queues CHANGE CommentAddress CommentAddress VARCHAR(120) CHARACTER SET ascii NULL;
-ALTER TABLE Links CHANGE Base Base varchar(240) CHARACTER SET ascii NULL;
-ALTER TABLE Links CHANGE Target Target varchar(240) CHARACTER SET ascii NULL;
+ALTER TABLE Links CHANGE Base Base VARCHAR(240) CHARACTER SET ascii NULL;
+ALTER TABLE Links CHANGE Target Target VARCHAR(240) CHARACTER SET ascii NULL;
+ALTER TABLE Links CHANGE Type Type VARCHAR(20) CHARACTER SET ascii NULL;
-ALTER TABLE ScripConditions CHANGE ExecModule ExecModule varchar(60) CHARACTER SET ascii NULL;
+ALTER TABLE Groups CHANGE Domain Domain VARCHAR(64) CHARACTER SET ascii NULL;
+ALTER TABLE Groups CHANGE Type Type VARCHAR(64) CHARACTER SET ascii NULL;
+
+ALTER TABLE Scrips CHANGE Stage Stage VARCHAR(32) CHARACTER SET ascii NULL
+
+ALTER TABLE ScripConditions CHANGE ExecModule ExecModule VARCHAR(60) CHARACTER SET ascii NULL;
ALTER TABLE ScripConditions CHANGE Argument Argument VARBINARY(255) NULL;
+ALTER TABLE ScripConditions CHANGE ApplicableTransTypes ApplicableTransTypes VARCHAR(60) CHARACTER SET ascii NULL;
+
+ALTER TABLE Tickets CHANGE Type Type VARCHAR(16) CHARACTER SET ascii NULL;
-ALTER TABLE Transactions CHANGE ObjectType ObjectType varchar(64) CHARACTER SET ascii NOT NULL;
-ALTER TABLE Transactions CHANGE Type Type varchar(20) CHARACTER SET ascii NULL;
-ALTER TABLE Transactions CHANGE Field Field varchar(40) CHARACTER SET ascii NULL;
-ALTER TABLE Transactions CHANGE ReferenceType ReferenceType varchar(255) CHARACTER SET ascii NULL;
-
-ALTER TABLE ACL CHANGE PrincipalType PrincipalType varchar(25) CHARACTER SET ascii NOT NULL;
-ALTER TABLE ACL CHANGE RightName RightName varchar(25) CHARACTER SET ascii NOT NULL;
-ALTER TABLE ACL CHANGE ObjectType ObjectType varchar(25) CHARACTER SET ascii NOT NULL;
+ALTER TABLE Transactions CHANGE ObjectType ObjectType VARCHAR(64) CHARACTER SET ascii NOT NULL;
+ALTER TABLE Transactions CHANGE Type Type VARCHAR(20) CHARACTER SET ascii NULL;
+ALTER TABLE Transactions CHANGE Field Field VARCHAR(40) CHARACTER SET ascii NULL;
+ALTER TABLE Transactions CHANGE ReferenceType ReferenceType VARCHAR(255) CHARACTER SET ascii NULL;
+
+ALTER TABLE ACL CHANGE PrincipalType PrincipalType VARCHAR(25) CHARACTER SET ascii NOT NULL;
+ALTER TABLE ACL CHANGE RightName RightName VARCHAR(25) CHARACTER SET ascii NOT NULL;
+ALTER TABLE ACL CHANGE ObjectType ObjectType VARCHAR(25) CHARACTER SET ascii NOT NULL;
ALTER TABLE Users CHANGE Password Password VARBINARY(40) NULL;
ALTER TABLE Users CHANGE Comments Comments TEXT NULL;
ALTER TABLE Users CHANGE Signature Signature TEXT NULL;
ALTER TABLE Users CHANGE FreeformContactInfo FreeformContactInfo TEXT NULL;
-ALTER TABLE ScripActions CHANGE ExecModule ExecModule varchar(60) CHARACTER SET ascii NULL;
+ALTER TABLE ScripActions CHANGE ExecModule ExecModule VARCHAR(60) CHARACTER SET ascii NULL;
ALTER TABLE ScripActions CHANGE Argument Argument VARBINARY(255) NULL;
ALTER TABLE Templates CHANGE Content Content TEXT NULL;
+ALTER TABLE Templates CHANGE Type Type varchar(16) CHARACTER SET ascii NULL;
+ALTER TABLE Templates CHANGE Language Language varchar(16) CHARACTER SET ascii NULL;
-ALTER TABLE ObjectCustomFieldValues CHANGE ObjectType ObjectType varchar(255) CHARACTER SET ascii NOT NULL;
+ALTER TABLE ObjectCustomFieldValues CHANGE ObjectType ObjectType VARCHAR(255) CHARACTER SET ascii NOT NULL;
ALTER TABLE ObjectCustomFieldValues CHANGE LargeContent LargeContent LONGBLOB NULL;
+ALTER TABLE ObjectCustomFieldValues CHANGE ContentType ContentType VARCHAR(80) CHARACTER SET ascii NULL;
+ALTER TABLE ObjectCustomFieldValues CHANGE ContentEncoding ContentEncoding VARCHAR(80) CHARACTER SET ascii NULL;
-ALTER TABLE CustomFields CHANGE LookupType LookupType varchar(255) CHARACTER SET ascii NOT NULL;
+ALTER TABLE CustomFields CHANGE LookupType LookupType VARCHAR(255) CHARACTER SET ascii NOT NULL;
+ALTER TABLE CustomFields CHANGE Type Type VARCHAR(200) CHARACTER SET ascii NULL;
ALTER TABLE Attributes CHANGE Content Content BLOB;
-ALTER TABLE Attributes CHANGE ObjectType ObjectType varchar(64) CHARACTER SET ascii;
+ALTER TABLE Attributes CHANGE ObjectType ObjectType VARCHAR(64) CHARACTER SET ascii;
+ALTER TABLE Attributes CHANGE ContentType ContentType VARCHAR(16) CHARACTER SET ascii;
ALTER TABLE sessions CHANGE a_session a_session LONGBLOB;
More information about the Rt-commit
mailing list