Commit ad7c5c2f authored by Jérome Perrin's avatar Jérome Perrin

mysql_innodb_catalog: make owner and viewable_owner columns VARCHAR

We want these columns to be "binary" so that mariadbd compares them
without any collation, but we don't want to use binary type, because on
python 3 the brain attributes are bytes (user ids are strings everywhere
else).

This also normalize the same columns present in worklist cache table.
parent 4ff9ac47
......@@ -2,8 +2,8 @@ DROP TABLE IF EXISTS worklist_cache
<dtml-var sql_delimiter>
CREATE TABLE `worklist_cache` (
`count` INT UNSIGNED NOT NULL,
`owner` VARCHAR(32) DEFAULT '',
`viewable_owner` VARCHAR(32) NOT NULL DEFAULT '',
`owner` VARCHAR(255) binary DEFAULT '',
`viewable_owner` VARCHAR(255) binary NOT NULL DEFAULT '',
`security_uid` INT UNSIGNED NOT NULL,
`alternate_security_uid` INT UNSIGNED,
`other_security_uid` INT UNSIGNED,
......
......@@ -2,8 +2,8 @@ DROP TABLE IF EXISTS worklist_cache
<dtml-var sql_delimiter>
CREATE TABLE `worklist_cache` (
`count` INT UNSIGNED NOT NULL,
`owner` VARCHAR(32) DEFAULT '',
`viewable_owner` VARCHAR(32) NOT NULL DEFAULT '',
`owner` VARCHAR(255) binary DEFAULT '',
`viewable_owner` VARCHAR(255) binary NOT NULL DEFAULT '',
`security_uid` INT UNSIGNED NOT NULL,
`portal_type` VARCHAR(255) NOT NULL,
`validation_state` VARCHAR(255) NULL,
......
......@@ -5,8 +5,8 @@
CREATE TABLE `catalog` (
`uid` BIGINT UNSIGNED NOT NULL,
`security_uid` INT UNSIGNED,
`owner` varbinary(255) NOT NULL default '',
`viewable_owner` varbinary(255) NOT NULL default '',
`owner` varchar(255) binary NOT NULL default '',
`viewable_owner` varchar(255) binary NOT NULL default '',
`path` varchar(255) NOT NULL default '',
`relative_url` varchar(255) NOT NULL default '',
`parent_uid` BIGINT UNSIGNED default '0',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment