Migration class abstract

Constructors

Migration()

Properties

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

Methods

addIndex(String tableName, String indexName, List<String> columns, {ColumnIndex type = ColumnIndex.indexKey}) → Future<void>
alterColumn(String table, dynamic callback(Schema), {String beforeColumn = '', String afterColumn = ''}) → TableDefinition
create(String tableName, dynamic callback(Schema), [bool ifNotExists = false]) → TableDefinition
createTableIfNotExists(String tableName, dynamic callback(Schema)) → TableDefinition
down() → Future<void>
drop(String tableName) → Future<void>
dropColumn(String tableName, String columnName) → Future<void>
dropIndex(String tableName, String indexName) → Future<void>
dropTableIfExists(String tableName) → Future<void>
execute(String sql) → Future<void>
Sends sql to the database exactly as written.
executeAdapted(String sql) → Future<void>
Translates MySQL-dialect DDL into the active driver's dialect before running it. Only safe for schema statements — the grammar is not literal-aware.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renameColumn(String tableName, String oldName, String newName) → Future<void>
renameTable(String oldName, String newName) → Future<void>
toString() → String
A string representation of this object.
inherited
up() → Future<void>

Operators

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