addColumn method

  1. @override
void addColumn(
  1. String name,
  2. String type, {
  3. bool nullable = false,
  4. dynamic length,
  5. bool unsigned = false,
  6. bool zeroFill = false,
  7. dynamic defaultValue,
  8. String? comment,
  9. String? collation,
  10. String? expression,
  11. String? virtuality,
  12. bool increment = false,
  13. bool unique = false,
})
override

Implementation

@override
void addColumn(
  String name,
  String type, {
  bool nullable = false,
  dynamic length,
  bool unsigned = false,
  bool zeroFill = false,
  dynamic defaultValue,
  String? comment,
  String? collation,
  String? expression,
  String? virtuality,
  bool increment = false,
  bool unique = false,
}) {
  _columns.add(
    ColumnBlueprint(
      name: name,
      type: _parseColumnType(type),
      nullable: nullable,
      length: length is int ? length : null,
      precision: _extractPrecision(type),
      scale: _extractScale(type),
      unsigned: unsigned,
      zeroFill: zeroFill,
      defaultValue: defaultValue,
      comment: comment,
      collation: collation,
      expression: expression,
      virtuality: virtuality,
      autoIncrement: increment,
      unique: unique,
      enumValues: _extractEnumValues(type),
      setValues: _extractSetValues(type),
    ),
  );
}