compileCreateIndex function
The CREATE INDEX of the index name of the columns of the table
table, which may be qualified by its schema, if it does not exist.
Implementation
String compileCreateIndex(
String name,
String table,
List<String> columns, {
bool unique = false,
}) =>
'CREATE ${unique ? 'UNIQUE ' : ''}INDEX IF NOT EXISTS '
'${sql.quotePostgresIdentifier(name)} '
'ON ${sql.quotePostgresTableName(table)} '
'(${columns.map((c) => sql.compileIndexColumn(c, sql.quotePostgresPart)).join(',')});';