[icinga-checkins] icinga.org: icinga-web/master: * removed unique index on email from nsm_user (fixes #2228)

git at icinga.org git at icinga.org
Thu Jan 26 17:31:40 CET 2012


Module: icinga-web
Branch: master
Commit: 65edfd315b1691081c5310980634b3e5a4172768
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=65edfd315b1691081c5310980634b3e5a4172768

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Jan 26 17:31:18 2012 +0100

* removed unique index on email from nsm_user (fixes #2228)

---

 app/modules/AppKit/lib/database/models/NsmUser.php |   13 +++++++------
 etc/schema/updates/mysql_v1-6_to_v1-7.sql          |    1 +
 etc/schema/updates/oracle_v1-6_to_v1-7.sql         |    1 +
 etc/schema/updates/pgsql_v1-6_to_v1-7.sql          |    1 +
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/app/modules/AppKit/lib/database/models/NsmUser.php b/app/modules/AppKit/lib/database/models/NsmUser.php
index d364d93..4c3ed26 100644
--- a/app/modules/AppKit/lib/database/models/NsmUser.php
+++ b/app/modules/AppKit/lib/database/models/NsmUser.php
@@ -44,12 +44,13 @@ class NsmUser extends BaseNsmUser {
                          'type' => 'unique'
         ));
 
-        $this->index('user_email_unique', array(
-                         'fields' => array(
-                             'user_email'
-                          ),
-                          'type' => 'unique'
-        ));
+           // Removed by #2228
+//         $this->index('user_email_unique', array(
+//                          'fields' => array(
+//                              'user_email'
+//                           ),
+//                           'type' => 'unique'
+//         ));
         
         $this->index('user_search', array(
                          'fields' => array(
diff --git a/etc/schema/updates/mysql_v1-6_to_v1-7.sql b/etc/schema/updates/mysql_v1-6_to_v1-7.sql
new file mode 100644
index 0000000..4e17d53
--- /dev/null
+++ b/etc/schema/updates/mysql_v1-6_to_v1-7.sql
@@ -0,0 +1 @@
+ALTER TABLE `nsm_user` DROP INDEX `user_email_unique_idx`;
diff --git a/etc/schema/updates/oracle_v1-6_to_v1-7.sql b/etc/schema/updates/oracle_v1-6_to_v1-7.sql
new file mode 100644
index 0000000..4a74507
--- /dev/null
+++ b/etc/schema/updates/oracle_v1-6_to_v1-7.sql
@@ -0,0 +1 @@
+ALTER TABLE nsm_user DROP INDEX user_email_unique;
diff --git a/etc/schema/updates/pgsql_v1-6_to_v1-7.sql b/etc/schema/updates/pgsql_v1-6_to_v1-7.sql
new file mode 100644
index 0000000..4a74507
--- /dev/null
+++ b/etc/schema/updates/pgsql_v1-6_to_v1-7.sql
@@ -0,0 +1 @@
+ALTER TABLE nsm_user DROP INDEX user_email_unique;





More information about the icinga-checkins mailing list