addIndex method
Adds a unique or a standard index of columns. Throws an
UnsupportedError for a primary key, which SQLite adds to no table.
Implementation
@override
void addIndex(String name, List<String> columns, IndexType type) {
if (type == IndexType.primaryKey) {
throw _rebuildNeeded('add a primary key');
}
var table = _currentName;
var statement = compileCreateIndex(
name,
table,
columns,
unique: type == IndexType.unique,
);
_statements.add(() => statement);
}