[Rt-commit] rt branch, 4.6-mysql_utf8mb4, created. rt-4.4.4-535-g949c8aa076
Michel Rodriguez
michel at bestpractical.com
Tue Nov 26 15:32:40 EST 2019
The branch, 4.6-mysql_utf8mb4 has been created
at 949c8aa0764a5574ef4d0050abac5e1bdbbeb3f6 (commit)
- Log -----------------------------------------------------------------
commit bfa4df18e04de8553620840a8de83a9fdec0939e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 15 22:07:52 2019 +0800
Remove unnecessary div.form-row for cf widget on group create/modify pages
It didn't have corresponding "col" divs as children, so the UI was
actually broken(the "Custom Fields" widget was quite narrow).
diff --git a/share/html/Admin/Groups/Modify.html b/share/html/Admin/Groups/Modify.html
index 41cc012f99..0d746017b1 100644
--- a/share/html/Admin/Groups/Modify.html
+++ b/share/html/Admin/Groups/Modify.html
@@ -88,9 +88,7 @@
</div>
</div>
</&>
- <div class="form-row">
- <& /Elements/EditCustomFieldCustomGroupings , Object => $Group, &>
- </div>
+ <& /Elements/EditCustomFieldCustomGroupings , Object => $Group, &>
% $m->callback( %ARGS, GroupObj => $Group, results => \@results );
% if ( $Create ) {
commit 00babf27a96a927787107c1598739dead18505df
Author: michel <michel at bestpractical.com>
Date: Thu Nov 21 15:39:20 2019 +0100
Adds support for utf8mb4 in mysql.
This allows 4-byte characters, such as emojis, in fields.
This feature is supported in mysql 5.5.3 and later.
It requires the database to be converted to utf8mb4 to
support those characters.
diff --git a/README b/README
index 6ec2810146..e963a6203b 100644
--- a/README
+++ b/README
@@ -20,7 +20,7 @@ o Perl 5.10.1 or later (http://www.perl.org).
o A supported SQL database
- Currently supported: MySQL 5.1 - 5.7 with InnoDB support
+ Currently supported: MySQL 5.5.3 - 5.7 with InnoDB support
MariaDB 10.0 - 10.1 with InnoDB support
Postgres 9.0 or later
Oracle 11g or later
diff --git a/etc/schema.mysql b/etc/schema.mysql
index cb87d86a3a..151fc3eed6 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -13,7 +13,7 @@ CREATE TABLE Attachments (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
@@ -35,7 +35,7 @@ CREATE TABLE Queues (
SLADisabled int2 NOT NULL DEFAULT 1 ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX Queues1 ON Queues (Name) ;
CREATE INDEX Queues2 ON Queues (Disabled) ;
@@ -54,7 +54,7 @@ CREATE TABLE Links (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Links2 ON Links (Base, Type) ;
CREATE INDEX Links3 ON Links (Target, Type) ;
@@ -81,7 +81,7 @@ CREATE TABLE Groups (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Groups1 ON Groups (Domain, Name, Instance);
CREATE INDEX Groups2 On Groups (Instance);
@@ -99,7 +99,7 @@ CREATE TABLE ScripConditions (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Transactions (
@@ -119,7 +119,7 @@ CREATE TABLE Transactions (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
@@ -140,7 +140,7 @@ CREATE TABLE Scrips (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectScrips (
id INTEGER NOT NULL AUTO_INCREMENT,
@@ -154,7 +154,7 @@ CREATE TABLE ObjectScrips (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX ObjectScrips1 ON ObjectScrips (ObjectId, Scrip);
@@ -171,7 +171,7 @@ CREATE TABLE ACL (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX ACL1 on ACL(RightName, ObjectType, ObjectId,PrincipalType,PrincipalId);
@@ -186,7 +186,7 @@ CREATE TABLE GroupMembers (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX GroupMembers1 on GroupMembers (GroupId, MemberId);
@@ -206,7 +206,7 @@ create table CachedGroupMembers (
# group members recursively.
# Also, this allows us to have the ACL system elide members of disabled groups
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled);
CREATE INDEX CachedGroupMembers2 on CachedGroupMembers (MemberId, GroupId, Disabled);
@@ -246,7 +246,7 @@ CREATE TABLE Users (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX Users1 ON Users (Name) ;
@@ -283,7 +283,7 @@ CREATE TABLE Tickets (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Tickets1 ON Tickets (Queue, Status) ;
CREATE INDEX Tickets2 ON Tickets (Owner) ;
@@ -302,7 +302,7 @@ CREATE TABLE ScripActions (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -318,7 +318,7 @@ CREATE TABLE Templates (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -340,7 +340,7 @@ CREATE TABLE ObjectCustomFieldValues (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 , # New -- whether the value was current
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content);
CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
@@ -369,7 +369,7 @@ CREATE TABLE CustomFields (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -384,7 +384,7 @@ CREATE TABLE ObjectCustomFields (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -401,7 +401,7 @@ CREATE TABLE CustomFieldValues (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField);
@@ -421,7 +421,7 @@ CREATE TABLE Attributes (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Attributes1 on Attributes(Name);
CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
@@ -449,7 +449,7 @@ CREATE TABLE Classes (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Articles (
id int(11) NOT NULL auto_increment,
@@ -465,7 +465,7 @@ CREATE TABLE Articles (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Topics (
id int(11) NOT NULL auto_increment,
@@ -475,7 +475,7 @@ CREATE TABLE Topics (
ObjectType varchar(64) character set ascii NOT NULL default '',
ObjectId int(11) NOT NULL default '0',
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectTopics (
id int(11) NOT NULL auto_increment,
@@ -483,7 +483,7 @@ CREATE TABLE ObjectTopics (
ObjectType varchar(64) character set ascii NOT NULL default '',
ObjectId int(11) NOT NULL default '0',
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectClasses (
id int(11) NOT NULL auto_increment,
@@ -495,7 +495,7 @@ CREATE TABLE ObjectClasses (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Assets (
id int(11) NOT NULL AUTO_INCREMENT,
@@ -508,7 +508,7 @@ CREATE TABLE Assets (
LastUpdatedBy int(11) NOT NULL DEFAULT 0,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX AssetsName ON Assets (Name);
CREATE INDEX AssetsStatus ON Assets (Status);
@@ -525,7 +525,7 @@ CREATE TABLE Catalogs (
LastUpdatedBy int(11) NOT NULL DEFAULT 0,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX CatalogsName ON Catalogs (Name);
CREATE INDEX CatalogsDisabled ON Catalogs (Disabled);
@@ -543,7 +543,7 @@ CREATE TABLE CustomRoles (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectCustomRoles (
id INTEGER NOT NULL AUTO_INCREMENT,
@@ -556,6 +556,6 @@ CREATE TABLE ObjectCustomRoles (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8;
+) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX ObjectCustomRoles1 ON ObjectCustomRoles (ObjectId, CustomRole);
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 29e929e7b7..31403c4a66 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -129,8 +129,13 @@ sub Connect {
if ( $db_type eq 'mysql' ) {
my $version = $self->DatabaseVersion;
- ($version) = $version =~ /^(\d+\.\d+)/;
- $self->dbh->do("SET NAMES 'utf8'") if $version >= 4.1;
+
+ if( cmp_version( $version, '5.5.3') > 0 ) {
+ $self->dbh->do("SET NAMES 'utf8mb4'");
+ }
+ elsif( cmp_version( $version, '4.1') >= 0 ) {
+ $self->dbh->do("SET NAMES 'utf8'");
+ }
}
elsif ( $db_type eq 'Pg' ) {
my $version = $self->DatabaseVersion;
@@ -141,6 +146,7 @@ sub Connect {
$self->dbh->{'LongReadLen'} = RT->Config->Get('MaxAttachmentSize');
}
+
=head2 BuildDSN
Build the DSN for the RT database. Doesn't take any parameters, draws all that
@@ -271,9 +277,9 @@ sub CheckCompatibility {
return (0, "couldn't get version of the mysql server")
unless $version;
- ($version) = $version =~ /^(\d+\.\d+)/;
- return (0, "RT is unsupported on MySQL versions before 4.1. Your version is $version.")
- if $version < 4.1;
+ my $min_version = '5.6';
+ return (0, "RT is unsupported on MySQL versions before $min_version. Your version is $version.")
+ if cmp_version( $version, $min_version) < 0;
# MySQL must have InnoDB support
local $dbh->{FetchHashKeyName} = 'NAME_lc';
@@ -320,7 +326,6 @@ sub CheckCompatibility {
}
}
}
- }
return (1)
}
commit fac60237011c50ab1bb36249bf55ea98b8cc6294
Author: michel <michel at bestpractical.com>
Date: Tue Nov 26 16:27:02 2019 +0100
Adds check on the database encoding. It should be utf8mb4.
We check one column (Tickets.Subject) for practical reasons.
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 31403c4a66..685dd5c46e 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -326,6 +326,25 @@ sub CheckCompatibility {
}
}
}
+
+ # check that the DB encoding is utf8mb4
+ # we check one specific column (Tickets.Subject):
+ # - checking the DB default may be misleading (what's relevant is wheter RT tables have teh proper charset)
+ # - checking all columns would be expensive
+ my $allowed_charset = 'utf8mb4';
+ my $column_info = $dbh->selectrow_hashref( "show full columns from Tickets where Field = 'Subject'" );
+ if( $column_info) {
+ # $column_info is only defined if the table exists, skip the check it it doesn't (during make initdb)
+ # we get the charset from the collation on the field
+ my $collation = $column_info->{collation};
+ my $collation_info = $dbh->selectrow_hashref( "SHOW COLLATION WHERE Collation = ?", {}, $collation);
+ my $charset = $collation_info->{charset} || '';
+ if( $charset ne $allowed_charset) {
+ warn "table encoding set to $charset, it should be $allowed_charset\n";
+ }
+ }
+ }
+
return (1)
}
commit f6f14e8c45d52815c68fda194c552d2a6bf99a87
Author: michel <michel at bestpractical.com>
Date: Tue Nov 26 16:26:07 2019 +0100
Adds README.MySQL to explain utf8mb4 character set options.
diff --git a/README.MySQL b/README.MySQL
new file mode 100644
index 0000000000..5740a805e8
--- /dev/null
+++ b/README.MySQL
@@ -0,0 +1,46 @@
+In MySQL, RT uses the utf8mb4 character set, in order to support all
+unicode characters, including the ones that are encoded on 4 bytes in
+utf8 (some Kanji characters and a good number of emojis).
+
+The DB tables and the RT client are both set to this character set.
+
+Unless the DB is shared with other applications that do not use this
+character set, it should be configured to use it by default. This
+should be done in the server, client and mysqldump sections of the
+mysql config files.
+
+This is done by adding the following lines to the MySQL configuration:
+
+[mysqld]
+character-set-server = utf8mb4
+collation-server = utf8mb4_unicode_ci
+
+[client]
+default-character-set = utf8mb4
+
+[mysqldump]
+default-character-set = utf8mb4
+
+The configuration should be in /etc/my.cnf (RedHat) or /etc/mysql/
+(Debian, split between various files).
+
+You can check the values your server is using by running this command:
+ mysqladmin variables | grep -i character_set
+
+Setting the default is particularly important for mysqldump, to avoid
+backups to be silently corrupted.
+
+
+If the MySQL DB is shared with other applications and the default
+character set cannot be set to utf8mb4, the command to backup the
+database must set it explicitely:
+
+ ( mysqldump --default-character-set=utf8mb4 rt4 --tables sessions --no-data --single-transaction; \
+ mysqldump --default-character-set=utf8mb4 rt4 --ignore-table rt4.sessions --single-transaction ) \
+ | gzip > rt-`date +%Y%m%d`.sql.gz
+
+Restoring a backup is done the usual way, since the character set for
+all tables is set to utf8mb4, there is no further need to tell MySQL
+about it:
+
+ gunzip -c rt-20191125.sql.gz | mysql -uroot -p rt4
commit 949c8aa0764a5574ef4d0050abac5e1bdbbeb3f6
Author: michel <michel at bestpractical.com>
Date: Tue Nov 26 18:45:07 2019 +0100
Normalizes engine/character set/collation declaration for all tables.
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 151fc3eed6..9c4cee953b 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -13,7 +13,7 @@ CREATE TABLE Attachments (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
@@ -35,7 +35,7 @@ CREATE TABLE Queues (
SLADisabled int2 NOT NULL DEFAULT 1 ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX Queues1 ON Queues (Name) ;
CREATE INDEX Queues2 ON Queues (Disabled) ;
@@ -54,7 +54,7 @@ CREATE TABLE Links (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Links2 ON Links (Base, Type) ;
CREATE INDEX Links3 ON Links (Target, Type) ;
@@ -81,7 +81,7 @@ CREATE TABLE Groups (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Groups1 ON Groups (Domain, Name, Instance);
CREATE INDEX Groups2 On Groups (Instance);
@@ -99,7 +99,7 @@ CREATE TABLE ScripConditions (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Transactions (
@@ -119,7 +119,7 @@ CREATE TABLE Transactions (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
@@ -140,7 +140,7 @@ CREATE TABLE Scrips (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectScrips (
id INTEGER NOT NULL AUTO_INCREMENT,
@@ -154,7 +154,7 @@ CREATE TABLE ObjectScrips (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX ObjectScrips1 ON ObjectScrips (ObjectId, Scrip);
@@ -171,7 +171,7 @@ CREATE TABLE ACL (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX ACL1 on ACL(RightName, ObjectType, ObjectId,PrincipalType,PrincipalId);
@@ -186,7 +186,7 @@ CREATE TABLE GroupMembers (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX GroupMembers1 on GroupMembers (GroupId, MemberId);
@@ -206,7 +206,7 @@ create table CachedGroupMembers (
# group members recursively.
# Also, this allows us to have the ACL system elide members of disabled groups
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled);
CREATE INDEX CachedGroupMembers2 on CachedGroupMembers (MemberId, GroupId, Disabled);
@@ -283,7 +283,7 @@ CREATE TABLE Tickets (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Tickets1 ON Tickets (Queue, Status) ;
CREATE INDEX Tickets2 ON Tickets (Owner) ;
@@ -302,7 +302,7 @@ CREATE TABLE ScripActions (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -318,7 +318,7 @@ CREATE TABLE Templates (
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -340,7 +340,7 @@ CREATE TABLE ObjectCustomFieldValues (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 , # New -- whether the value was current
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content);
CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
@@ -369,7 +369,7 @@ CREATE TABLE CustomFields (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -384,7 +384,7 @@ CREATE TABLE ObjectCustomFields (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
@@ -401,7 +401,7 @@ CREATE TABLE CustomFieldValues (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField);
@@ -421,7 +421,7 @@ CREATE TABLE Attributes (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX Attributes1 on Attributes(Name);
CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
@@ -449,7 +449,7 @@ CREATE TABLE Classes (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Articles (
id int(11) NOT NULL auto_increment,
@@ -465,7 +465,7 @@ CREATE TABLE Articles (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Topics (
id int(11) NOT NULL auto_increment,
@@ -475,7 +475,7 @@ CREATE TABLE Topics (
ObjectType varchar(64) character set ascii NOT NULL default '',
ObjectId int(11) NOT NULL default '0',
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectTopics (
id int(11) NOT NULL auto_increment,
@@ -483,7 +483,7 @@ CREATE TABLE ObjectTopics (
ObjectType varchar(64) character set ascii NOT NULL default '',
ObjectId int(11) NOT NULL default '0',
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectClasses (
id int(11) NOT NULL auto_increment,
@@ -495,7 +495,7 @@ CREATE TABLE ObjectClasses (
LastUpdatedBy int(11) NOT NULL default '0',
LastUpdated datetime default NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE Assets (
id int(11) NOT NULL AUTO_INCREMENT,
@@ -508,7 +508,7 @@ CREATE TABLE Assets (
LastUpdatedBy int(11) NOT NULL DEFAULT 0,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX AssetsName ON Assets (Name);
CREATE INDEX AssetsStatus ON Assets (Status);
@@ -525,7 +525,7 @@ CREATE TABLE Catalogs (
LastUpdatedBy int(11) NOT NULL DEFAULT 0,
LastUpdated datetime DEFAULT NULL,
PRIMARY KEY (id)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE INDEX CatalogsName ON Catalogs (Name);
CREATE INDEX CatalogsDisabled ON Catalogs (Disabled);
@@ -543,7 +543,7 @@ CREATE TABLE CustomRoles (
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE TABLE ObjectCustomRoles (
id INTEGER NOT NULL AUTO_INCREMENT,
@@ -556,6 +556,6 @@ CREATE TABLE ObjectCustomRoles (
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE = utf8mb4_unicode_ci;
+) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
CREATE UNIQUE INDEX ObjectCustomRoles1 ON ObjectCustomRoles (ObjectId, CustomRole);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list