Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/upgrade/3_7_1/update_db_schema.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/upgrade/3_7_1/update_db_schema.py	(revision 2444)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/upgrade/3_7_1/update_db_schema.py	(working copy)
@@ -46,5 +46,24 @@
         db.close()
 
 
+def alter_table_log_host():
+    db = DB.get_connected_db()
+    update_log_host_query = '''ALTER TABLE log_host
+                                DROP CONSTRAINT IF EXISTS log_host_pkey;
+                                ALTER TABLE log_host
+                                ADD COLUMN IF NOT EXISTS id SERIAL PRIMARY KEY;
+                                ALTER TABLE log_host
+                                ADD CONSTRAINT unique_host_port_protocol UNIQUE (host, port, protocol);'''
+
+    try:
+        db.execute_sql(update_log_host_query)
+    except Exception as e:
+        # Unable to import oper_log. Using print for now
+        print('Exception while executing update queries:{}'.format(e.message))
+    finally:
+        db.close()
+
+
 if __name__ == '__main__':
-    alter_table_file_type_list()
\ No newline at end of file
+    alter_table_file_type_list()
+    alter_table_log_host()
\ No newline at end of file
