CreateIndex class

Create an index on a table if it doesn't already exists

Inheritance

Constructors

CreateIndex({required String onTable, required List<String> columns, bool unique = false})
As a migration, this may fail if existing data is in conflict with the index. Before running this migration command, ensure that its table is either clean or does not contain data that conflicts with the columns specified by the index.
const

Properties

columns List<String>
final
down MigrationCommand
Outputs the opposite command to be used in a generator
no setteroverride
forGenerator String
Outputs model as String to be used in a generator
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
name String
no setter
onTable String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statement String
Outputs statement to be interpreted by SQLite
no setteroverride
unique bool
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Alias for statement
inherited

Operators

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

Static Methods

generateName(List<String> columns, String onTable) String