aboutsummaryrefslogtreecommitdiff
path: root/engine/schema
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-06 16:33:49 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-06 16:33:49 +0000
commit40f717cad9b54511d6d4c0d549fd253409f8dd12 (patch)
treec8d23219a154aa1a6cb5ab28d01014285542d3aa /engine/schema
parent3cb0559a580b2738c8aa7de601a495a169aa489e (diff)
downloadelgg-40f717cad9b54511d6d4c0d549fd253409f8dd12.tar.gz
elgg-40f717cad9b54511d6d4c0d549fd253409f8dd12.tar.bz2
datalists now has primary key, datalist set function optimised
git-svn-id: https://code.elgg.org/elgg/trunk@2417 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/schema')
-rw-r--r--engine/schema/mysql.sql2
-rw-r--r--engine/schema/upgrades/2008110601.sql3
2 files changed, 4 insertions, 1 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index b906f9b5b..695a2e79f 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -288,7 +288,7 @@ CREATE TABLE `prefix_users_sessions` (
CREATE TABLE `prefix_datalists` (
`name` varchar(32) NOT NULL,
`value` text NOT NULL,
- KEY `name` (`name`)
+ PRIMARY KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- System log
diff --git a/engine/schema/upgrades/2008110601.sql b/engine/schema/upgrades/2008110601.sql
new file mode 100644
index 000000000..ddd80a91b
--- /dev/null
+++ b/engine/schema/upgrades/2008110601.sql
@@ -0,0 +1,3 @@
+-- Alter datalists to have a primary key
+ALTER TABLE `prefix_datalists` DROP KEY `name`;
+ALTER TABLE `prefix_datalists` ADD PRIMARY KEY `name` (`name`);