r1806 + fix missing unique in RackObjectTags
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 21 Mar 2008 07:31:23 +0000 (07:31 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 21 Mar 2008 07:31:23 +0000 (07:31 +0000)
install/init-structure.sql
upgrade.php

index 16ab3718b2a0caf4417dd429af62543f0bcde396..7c680b907327577c0f32f6488e88999c1159ddf1 100644 (file)
@@ -227,7 +227,7 @@ CREATE TABLE `RackObjectHistory` (
 CREATE TABLE `RackObjectTags` (
   `object_id` int(10) unsigned default NULL,
   `tag_id` int(10) unsigned default NULL,
-  KEY `object_id` (`object_id`)
+  UNIQUE KEY `object_tag` (`object_id`,`tag_id`)
 ) TYPE=MyISAM;
 
 CREATE TABLE `RackSpace` (
index 8abf28c10a605aa8271d99cb34b1d49953b17060..6df5eec1da9ac63cde4fe2809caa5aadd6733f26 100644 (file)
@@ -1060,7 +1060,7 @@ CREATE TABLE `IPVirtualService` (
 CREATE TABLE `RackObjectTags` (
   `object_id` int(10) unsigned default NULL,
   `tag_id` int(10) unsigned default NULL,
-  KEY `object_id` (`object_id`)
+  UNIQUE KEY `object_tag` (`object_id`,`tag_id`)
 ) TYPE=MyISAM;
 ";
                        $query[] =