declareColumn method

  1. @override
MigrationColumn declareColumn(
  1. String name,
  2. Column column
)
inherited

Implementation

@override
MigrationColumn declareColumn(String name, Column column) {
  if (_columns.containsKey(name)) {
    throw StateError('Cannot redeclare column $name.');
  }
  var col = MigrationColumn.from(column);
  // Checks the precision and scale against the database's limits when the
  // column is declared, before any of the schema is run.
  compileColumn(col);
  _columns[name] = col;
  _add(_AddedColumn(name), [name]);
  _statements.last.introduced.add(_key(name));
  return col;
}