DatabaseMigration class abstract

Implementers

Constructors

DatabaseMigration()

Properties

connection ↔ DatabaseConnection
getter/setter pair
dbType → DatabaseType
no setter
description → String
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schemaManager ↔ SchemaManager
getter/setter pair
version → int
no setter

Methods

addColumn({required String table, required String column, required String type, bool nullable = true, String? defaultValue}) → Future<void>
Helper to add column (skips if exists)
createIndex({required String name, required String table, required List<String> columns, bool unique = false}) → Future<void>
Helper to create index (skips if exists)
createTable(DatabaseSchema schema) → Future<void>
Helper to create a table from schema (skips if exists)
down() → Future<void>
Migration down - rollback schema
dropColumn({required String table, required String column}) → Future<void>
Helper to drop column (skips if not exists)
dropIndex(String name) → Future<void>
Helper to drop index (skips if not exists)
dropTable(String tableName) → Future<void>
Helper to drop a table (skips if not exists)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setConnection(DatabaseConnection conn) → void
tableExists(String tableName) → Future<bool>
Helper to check if table exists
toString() → String
A string representation of this object.
inherited
up() → Future<void>
Migration up - create/modify schema

Operators

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