PostgresAlterTable class

Constructors

PostgresAlterTable(String tableName)

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tableName → String
final

Methods

addIndex(String name, List<String> columns, IndexType type) → void
boolean(String name) → MigrationColumn
inherited
changeColumnType(String name, ColumnType type, {int length = Column.defaultLength, int? precision, int? scale, bool? isNullable, Object? defaultValue, bool? autoIncrement, String? using}) → void
Changes the type of the column name to type, with its length, precision and scale, which are as for a Column: without a precision or scale, a numeric is unbounded on PostgreSQL, so that its values are kept, and numeric(17, 3) on MySQL and MariaDB.
compile(StringBuffer buf, int indent) → void
Compiles the ALTER TABLE statements of the table, indented by indent, which may be compiled again, as those of MySQL and MariaDB.
compileSequences(StringBuffer buf) → void
The statements after the ALTER TABLE that give each column changed to a serial type, or to autoIncrement, a default from a sequence of its own, if it has none, as serial does: the sequence is created, owned by the column, and starts after its greatest value.
date(String name) → MigrationColumn
inherited
decimal(String name, {int? precision, int? scale}) → MigrationColumn
A decimal(precision, scale) column. Without a precision or scale, it is an unbounded decimal on PostgreSQL, and decimal(17, 3) on MySQL and MariaDB (Column.defaultPrecision and Column.defaultScale). With a precision but no scale, the scale is Column.defaultScale, or the precision if smaller, e.g. decimal(10, 3); give scale: 0 for whole numbers.
inherited
declare(String name, ColumnType type) → MigrationColumn
inherited
declareColumn(String name, Column column) → MigrationColumn
double(String name) → MigrationColumn
inherited
dropColumn(String name) → void
dropIndex(String name) → void
dropNotNull(String name) → void
dropPrimaryIndex() → void
float(String name) → MigrationColumn
inherited
integer(String name) → MigrationColumn
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numeric(String name, {int? precision, int? scale}) → MigrationColumn
A numeric(precision, scale) column. Without a precision or scale, it is an unbounded numeric on PostgreSQL, and numeric(17, 3) on MySQL and MariaDB (Column.defaultPrecision and Column.defaultScale). With a precision but no scale, the scale is Column.defaultScale, or the precision if smaller, e.g. numeric(10, 3); give scale: 0 for whole numbers.
inherited
rename(String newName) → void
renameColumn(String name, String newName) → void
serial(String name) → MigrationColumn
inherited
setNotNull(String name) → void
text(String name) → MigrationColumn
inherited
timeStamp(String name, {bool timezone = false}) → MigrationColumn
inherited
toString() → String
A string representation of this object.
inherited
varChar(String name, {int? length}) → MigrationColumn
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited