enum Rotor::Operation

What a migration does, one step: its DSL records these, and Rotor::Migrator.render writes their SQL (the one place a dialect is rendered).

/home/runner/work/rotor/rotor/src/migration.qz:35

Variants

variant Rotor::Operation::CreateTable(name: String, columns: Array[Rotor::ColumnDef], indexes: Array[Rotor::IndexDef], if_not_exists: Bool)

/home/runner/work/rotor/rotor/src/migration.qz:36

variant Rotor::Operation::DropTable(name: String, columns: Array[Rotor::ColumnDef]?, indexes: Array[Rotor::IndexDef], if_exists: Bool)

(columns nil: not given, so not reversible.)

/home/runner/work/rotor/rotor/src/migration.qz:38

variant Rotor::Operation::RenameTable(name: String, to: String)

/home/runner/work/rotor/rotor/src/migration.qz:39

variant Rotor::Operation::AddColumn(table: String, column: Rotor::ColumnDef)

/home/runner/work/rotor/rotor/src/migration.qz:40

variant Rotor::Operation::RemoveColumn(table: String, name: String, column: Rotor::ColumnDef?)

(column nil: its type not given, so not reversible.)

/home/runner/work/rotor/rotor/src/migration.qz:42

variant Rotor::Operation::RenameColumn(table: String, name: String, to: String)

/home/runner/work/rotor/rotor/src/migration.qz:43

variant Rotor::Operation::ChangeColumn(table: String, name: String, null: Bool?, default: Int | Float | String | Bool | Bytes | Rotor::SQL::Raw | Rotor::NoDefault | Nil, was: Rotor::Was?)

/home/runner/work/rotor/rotor/src/migration.qz:44

variant Rotor::Operation::CreateIndex(index: Rotor::IndexDef)

/home/runner/work/rotor/rotor/src/migration.qz:45

variant Rotor::Operation::DropIndex(name: String, index: Rotor::IndexDef?, concurrently: Bool)

(index nil: named alone, so not reversible.)

/home/runner/work/rotor/rotor/src/migration.qz:47

variant Rotor::Operation::AddForeignKey(table: String, column: String, reference: Rotor::Reference)

/home/runner/work/rotor/rotor/src/migration.qz:48

variant Rotor::Operation::Execute(sql: String, down: String?)

/home/runner/work/rotor/rotor/src/migration.qz:49

Class methods

def self.irreversible(op: Rotor::Operation, hint: String) -> Nothing

(op cannot be reversed; hint says what would make it so.)

/home/runner/work/rotor/rotor/src/migration.qz:100

Methods

def describe -> String

The call that records it, for messages: create_table :users.

/home/runner/work/rotor/rotor/src/migration.qz:52

def reverse -> Rotor::Operation

The operation that undoes this one; raises Rotor::IrreversibleMigration when it cannot be known.

/home/runner/work/rotor/rotor/src/migration.qz:70