diff --git a/ccm-core/sql/ccm-core/default/upgrade/6.6.0-6.6.1/recreate_users_index.sql b/ccm-core/sql/ccm-core/default/upgrade/6.6.0-6.6.1/recreate_users_index.sql
new file mode 100644
index 000000000..74f97d270
--- /dev/null
+++ b/ccm-core/sql/ccm-core/default/upgrade/6.6.0-6.6.1/recreate_users_index.sql
@@ -0,0 +1,25 @@
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public License
+-- as published by the Free Software Foundation; either version 2.1 of
+-- the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+--
+-- $Id: recreateusers_index.sql pboy $
+
+-- for some unkown reason for some ccm installations an index for
+-- users tables has been lost. Just in case it is recreated here.
+
+-- First: Drop index to avoid an error it it already exists
+drop index if exists users_lower_screen_name_idx ;
+
+create unique index users_lower_screen_name_idx on users
+ USING btree (lower((screen_name)::text));
\ No newline at end of file
diff --git a/ccm-core/sql/ccm-core/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-core/sql/ccm-core/upgrade/postgres-6.6.0-6.6.1.sql
index ba5a977fe..99db5c657 100644
--- a/ccm-core/sql/ccm-core/upgrade/postgres-6.6.0-6.6.1.sql
+++ b/ccm-core/sql/ccm-core/upgrade/postgres-6.6.0-6.6.1.sql
@@ -22,5 +22,6 @@
begin;
\i ../default/upgrade/6.6.0-6.6.1/drop_tables_acs_stylesheets.sql
+\i ../default/upgrade/6.6.0-6.6.1/recreate_users_index.sql
commit;
diff --git a/ccm-core/src/ccm-core.upgrade b/ccm-core/src/ccm-core.upgrade
index 934c12fdd..58854e366 100755
--- a/ccm-core/src/ccm-core.upgrade
+++ b/ccm-core/src/ccm-core.upgrade
@@ -34,4 +34,7 @@
+
+
+