compileIndex static method

String? compileIndex(
  1. String name,
  2. MigrationColumn column
)

Implementation

static String? compileIndex(String name, MigrationColumn column) {
  if (column.indexType == IndexType.standardIndex) {
    return ' INDEX(`$name`)';
  } else if (column.indexType == IndexType.unique) {
    return ' UNIQUE KEY unique_$name (`$name`)';
  }

  return null;
}