示例#1
0
 @Override
 public Boolean call() throws Exception {
   Sql sql = null;
   try {
     sql = Upgrades.DatabaseFilters.NEWVERSION.getConnection("eucalyptus_cloud");
     sql.execute(
         "create index metadata_group_ips_rule_id_idx on metadata_network_rule_ip_ranges ( networkrule_id )");
     sql.execute(
         "create index metadata_group_peers_rule_id_idx on metadata_network_group_rule_peers ( networkrule_id )");
   } catch (Exception ex) {
     logger.error("Error creating network rule indexes", ex);
   } finally {
     if (sql != null) {
       sql.close();
     }
   }
   return true;
 }
示例#2
0
 @Override
 public Boolean call() throws Exception {
   Sql sql = null;
   try {
     sql = Upgrades.DatabaseFilters.NEWVERSION.getConnection("eucalyptus_auth");
     sql.execute(
         "alter table auth_group add constraint uk_4ns2wloivviwxjbx7jeg5ip31 unique ( auth_group_id_external )");
     sql.execute(
         "create index auth_group_users_user_idx on auth_group_has_users ( auth_user_id )");
     sql.execute(
         "create index auth_group_users_group_idx on auth_group_has_users ( auth_group_id )");
   } catch (Exception ex) {
     logger.error("Error creating group indexes", ex);
   } finally {
     if (sql != null) {
       sql.close();
     }
   }
   return true;
 }