[Rt-commit] rt branch, 4.2/utf8-links, created. rt-4.2.3-87-g3a6237f

Alex Vandiver alexmv at bestpractical.com
Thu Apr 17 16:14:52 EDT 2014


The branch, 4.2/utf8-links has been created
        at  3a6237fe15fbc462d6612b33fa8247be0bf61afb (commit)

- Log -----------------------------------------------------------------
commit 3a6237fe15fbc462d6612b33fa8247be0bf61afb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Apr 17 16:08:23 2014 -0400

    Switch the Links table to be UTF-8
    
    This allows linking to UTF-8 URLs, such as
    http://en.wikipedia.org/wiki/♨.  While altering merely the two columns
    is sufficient for this, altering the table's default brings it into line
    with the majority of RT's tables.
    
    Fixes I#19338.

diff --git a/etc/schema.mysql b/etc/schema.mysql
index 610a79c..da14e72 100755
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -46,7 +46,7 @@ CREATE TABLE Links (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   Base varchar(240) NULL,
   Target varchar(240) NULL,
-  Type varchar(20) NOT NULL,
+  Type varchar(20) CHARACTER SET ascii NOT NULL ,
   LocalTarget integer NOT NULL DEFAULT 0  ,
   LocalBase integer NOT NULL DEFAULT 0  ,
   LastUpdatedBy integer NOT NULL DEFAULT 0  ,
@@ -54,7 +54,7 @@ CREATE TABLE Links (
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
   PRIMARY KEY (id)
-) ENGINE=InnoDB CHARACTER SET ascii;
+) ENGINE=InnoDB CHARACTER SET utf8;
 
 CREATE INDEX Links2 ON Links (Base,  Type) ;
 CREATE INDEX Links3 ON Links (Target,  Type) ;
diff --git a/etc/upgrade/4.2.4/schema.mysql b/etc/upgrade/4.2.4/schema.mysql
new file mode 100644
index 0000000..71f8f64
--- /dev/null
+++ b/etc/upgrade/4.2.4/schema.mysql
@@ -0,0 +1,4 @@
+ALTER TABLE Links
+  DEFAULT CHARACTER SET utf8,
+  MODIFY Base   varchar(240) CHARACTER SET utf8 NULL,
+  MODIFY Target varchar(240) CHARACTER SET utf8 NULL;

-----------------------------------------------------------------------


More information about the rt-commit mailing list