ALTER DATABASE rt3 DEFAULT CHARACTER SET utf8;
ALTER TABLE ACL
   DEFAULT CHARACTER SET utf8,
   MODIFY RightName VARBINARY(25) NOT NULL DEFAULT '',
   MODIFY PrincipalType VARBINARY(25) NOT NULL DEFAULT '',
   MODIFY ObjectType VARBINARY(25) NOT NULL DEFAULT '';
ALTER TABLE ACL
   MODIFY RightName VARCHAR(25) CHARACTER SET ascii NOT NULL DEFAULT '',
   MODIFY PrincipalType VARCHAR(25) CHARACTER SET ascii NOT NULL DEFAULT '',
   MODIFY ObjectType VARCHAR(25) CHARACTER SET ascii NOT NULL DEFAULT '';
ALTER TABLE Attachments
   DEFAULT CHARACTER SET utf8,
   MODIFY ContentType VARBINARY(80) NULL DEFAULT NULL,
   MODIFY MessageId VARBINARY(160) NULL DEFAULT NULL,
   MODIFY Content LONGBLOB NULL DEFAULT NULL,
   MODIFY ContentEncoding VARBINARY(80) NULL DEFAULT NULL;
ALTER TABLE Attachments
   MODIFY ContentType VARCHAR(80) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY MessageId VARCHAR(160) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ContentEncoding VARCHAR(80) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE Attributes
   DEFAULT CHARACTER SET utf8,
   MODIFY ContentType VARBINARY(16) NULL DEFAULT NULL,
   MODIFY Content BLOB NULL DEFAULT NULL,
   MODIFY ObjectType VARBINARY(64) NULL DEFAULT NULL;
ALTER TABLE Attributes
   MODIFY ContentType VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ObjectType VARCHAR(64) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE CustomFields
   DEFAULT CHARACTER SET utf8,
   MODIFY LookupType VARBINARY(255) NOT NULL DEFAULT '',
   MODIFY Type VARBINARY(200) NULL DEFAULT NULL;
ALTER TABLE CustomFields
   MODIFY LookupType VARCHAR(255) CHARACTER SET ascii NOT NULL DEFAULT '',
   MODIFY Type VARCHAR(200) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE CustomFieldValues
   DEFAULT CHARACTER SET utf8;
ALTER TABLE GroupMembers
   DEFAULT CHARACTER SET utf8;
ALTER TABLE Groups
   DEFAULT CHARACTER SET utf8,
   MODIFY Domain VARBINARY(64) NULL DEFAULT NULL,
   MODIFY Type VARBINARY(64) NULL DEFAULT NULL;
ALTER TABLE Groups
   MODIFY Domain VARCHAR(64) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Type VARCHAR(64) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE Links
   DEFAULT CHARACTER SET utf8,
   MODIFY Target VARBINARY(240) NULL DEFAULT NULL,
   MODIFY Base VARBINARY(240) NULL DEFAULT NULL,
   MODIFY Type VARBINARY(20) NOT NULL DEFAULT '';
ALTER TABLE Links
   MODIFY Target VARCHAR(240) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Base VARCHAR(240) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Type VARCHAR(20) CHARACTER SET ascii NOT NULL DEFAULT '';
ALTER TABLE ObjectCustomFields
   DEFAULT CHARACTER SET utf8;
ALTER TABLE ObjectCustomFieldValues
   DEFAULT CHARACTER SET utf8,
   MODIFY ContentType VARBINARY(80) NULL DEFAULT NULL,
   MODIFY LargeContent LONGBLOB NULL DEFAULT NULL,
   MODIFY ContentEncoding VARBINARY(80) NULL DEFAULT NULL,
   MODIFY ObjectType VARBINARY(255) NOT NULL DEFAULT '';
ALTER TABLE ObjectCustomFieldValues
   MODIFY ContentType VARCHAR(80) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ContentEncoding VARCHAR(80) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ObjectType VARCHAR(255) CHARACTER SET ascii NOT NULL DEFAULT '';
ALTER TABLE Principals
   DEFAULT CHARACTER SET utf8,
   MODIFY PrincipalType VARBINARY(16) NOT NULL DEFAULT '';
ALTER TABLE Principals
   MODIFY PrincipalType VARCHAR(16) CHARACTER SET ascii NOT NULL DEFAULT '';
ALTER TABLE Queues
   DEFAULT CHARACTER SET utf8,
   MODIFY CorrespondAddress VARBINARY(120) NULL DEFAULT NULL,
   MODIFY CommentAddress VARBINARY(120) NULL DEFAULT NULL;
ALTER TABLE Queues
   MODIFY CorrespondAddress VARCHAR(120) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY CommentAddress VARCHAR(120) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE ScripActions
   DEFAULT CHARACTER SET utf8,
   MODIFY Argument VARBINARY(255) NULL DEFAULT NULL,
   MODIFY ExecModule VARBINARY(60) NULL DEFAULT NULL;
ALTER TABLE ScripActions
   MODIFY ExecModule VARCHAR(60) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE ScripConditions
   DEFAULT CHARACTER SET utf8,
   MODIFY ApplicableTransTypes VARBINARY(60) NULL DEFAULT NULL,
   MODIFY Argument VARBINARY(255) NULL DEFAULT NULL,
   MODIFY ExecModule VARBINARY(60) NULL DEFAULT NULL;
ALTER TABLE ScripConditions
   MODIFY ApplicableTransTypes VARCHAR(60) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ExecModule VARCHAR(60) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE Scrips
   DEFAULT CHARACTER SET utf8,
   MODIFY Stage VARBINARY(32) NULL DEFAULT NULL;
ALTER TABLE Scrips
   MODIFY Stage VARCHAR(32) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE sessions
   DEFAULT CHARACTER SET utf8,
   MODIFY id BINARY(32) NOT NULL DEFAULT '',
   MODIFY a_session LONGBLOB NULL DEFAULT NULL;
ALTER TABLE Templates
   DEFAULT CHARACTER SET utf8,
   MODIFY Type VARBINARY(16) NULL DEFAULT NULL,
   MODIFY Language VARBINARY(16) NULL DEFAULT NULL;
ALTER TABLE Templates
   MODIFY Type VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Language VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Content TEXT CHARACTER SET utf8 NULL DEFAULT NULL;
ALTER TABLE Tickets
   DEFAULT CHARACTER SET utf8,
   MODIFY Status VARBINARY(10) NULL DEFAULT NULL,
   MODIFY Type VARBINARY(16) NULL DEFAULT NULL;
ALTER TABLE Tickets
   MODIFY Status VARCHAR(10) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Type VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL;
ALTER TABLE Transactions
   DEFAULT CHARACTER SET utf8,
   MODIFY Field VARBINARY(40) NULL DEFAULT NULL,
   MODIFY Type VARBINARY(20) NULL DEFAULT NULL,
   MODIFY ReferenceType VARBINARY(255) NULL DEFAULT NULL,
   MODIFY ObjectType VARBINARY(64) NOT NULL DEFAULT '';
ALTER TABLE Transactions
   MODIFY Field VARCHAR(40) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Type VARCHAR(20) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ReferenceType VARCHAR(255) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY ObjectType VARCHAR(64) CHARACTER SET ascii NOT NULL DEFAULT '';
ALTER TABLE Users
   DEFAULT CHARACTER SET utf8,
   MODIFY WebEncoding VARBINARY(16) NULL DEFAULT NULL,
   MODIFY PGPKey BLOB NULL DEFAULT NULL,
   MODIFY Password VARBINARY(40) NULL DEFAULT NULL,
   MODIFY Timezone VARBINARY(50) NULL DEFAULT NULL,
   MODIFY EmailAddress VARBINARY(120) NULL DEFAULT NULL,
   MODIFY EmailEncoding VARBINARY(16) NULL DEFAULT NULL,
   MODIFY Lang VARBINARY(16) NULL DEFAULT NULL;
ALTER TABLE Users
   MODIFY WebEncoding VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Comments TEXT CHARACTER SET utf8 NULL DEFAULT NULL,
   MODIFY Timezone VARCHAR(50) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY FreeformContactInfo TEXT CHARACTER SET utf8 NULL DEFAULT NULL,
   MODIFY EmailAddress VARCHAR(120) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY EmailEncoding VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL,
   MODIFY Signature TEXT CHARACTER SET utf8 NULL DEFAULT NULL,
   MODIFY Lang VARCHAR(16) CHARACTER SET ascii NULL DEFAULT NULL;
