docs: Index addIndex(int[] col, HsqlName name, boolean unique, boolean migrating) {
  
          Index newindex;
  
          if (table.isEmpty(session) || table.isIndexingMutable()) {
              PersistentStore store = session.sessionData.getRowStore(table);
  
              newindex = table.createIndex(store, name, col, null, null, unique, migrating,
                                           false, false);
          } else {
              newindex = table.createIndexStructure(name, col, null, null,
                                                    unique, migrating, false, false);
  
              Table tn = table.moveDefinition(session, table.tableType, null,
                                              null, newindex, -1, 0, emptySet,
                                              emptySet);
  
              // for all sessions move the data
              tn.moveData(session, table, -1, 0);
              database.persistentStoreCollection.releaseStore(table);
  
              table = tn;
  
              setNewTableInSchema(table);
              updateConstraints(table, emptySet);
          }
  
          database.schemaManager.addSchemaObject(newindex);
          database.schemaManager.recompileDependentObjects(table);
  
          return newindex;
      }