From 7a5007f929a241c318325fa29a62e162a2b78bfa Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 5 Dec 2008 12:05:59 +0000 Subject: Closes #611: Made name field longer git-svn-id: https://code.elgg.org/elgg/trunk@2506 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/schema/mysql.sql | 6 ++++-- engine/schema/upgrades/2008111901.sql | 2 +- engine/schema/upgrades/2008120501.sql | 9 +++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 engine/schema/upgrades/2008120501.sql (limited to 'engine') diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql index 59f11357b..391cad46e 100644 --- a/engine/schema/mysql.sql +++ b/engine/schema/mysql.sql @@ -307,10 +307,12 @@ CREATE TABLE `prefix_datalists` ( CREATE TABLE `prefix_private_settings` ( `id` INT NOT NULL auto_increment, `entity_guid` INT NOT NULL , - `name` VARCHAR( 32 ) NOT NULL , + `name` varchar(128) NOT NULL , `value` TEXT NOT NULL , PRIMARY KEY ( `id` ) , - UNIQUE KEY ( `entity_guid` , `name` ) + UNIQUE KEY ( `entity_guid` , `name` ), + KEY `name` (`name`), + KEY `value` (`value`) ) ENGINE = MYISAM DEFAULT CHARSET=utf8; -- System log diff --git a/engine/schema/upgrades/2008111901.sql b/engine/schema/upgrades/2008111901.sql index 7c27c9c50..617678bb6 100644 --- a/engine/schema/upgrades/2008111901.sql +++ b/engine/schema/upgrades/2008111901.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS `prefix_private_settings` ( `id` INT NOT NULL auto_increment, `entity_guid` INT NOT NULL , - `name` VARCHAR( 32 ) NOT NULL , + `name` VARCHAR( 128 ) NOT NULL , `value` TEXT NOT NULL , PRIMARY KEY ( `id` ) , UNIQUE KEY ( `entity_guid` , `name` ) diff --git a/engine/schema/upgrades/2008120501.sql b/engine/schema/upgrades/2008120501.sql new file mode 100644 index 000000000..bd08556ee --- /dev/null +++ b/engine/schema/upgrades/2008120501.sql @@ -0,0 +1,9 @@ +-- Modify field length in private settings (for people who upgraded while #611 present) +ALTER TABLE `prefix_private_settings` MODIFY `name` varchar(128) NOT NULL; + +-- While we're at it, add some more keys +ALTER TABLE `prefix_private_settings` DROP KEY `name`; +ALTER TABLE `prefix_private_settings` ADD KEY `name` (`name`); + +ALTER TABLE `prefix_private_settings` DROP KEY `value`; +ALTER TABLE `prefix_private_settings` ADD KEY `value` (`value`); \ No newline at end of file -- cgit v1.2.3