data Rotor::ColumnDef(name: String, type: String, null: Bool, default: Int | Float | String | Bool | Bytes | Rotor::SQL::Raw | Nil, primary: Bool, identity: Bool, references: Rotor::Reference?)

A column a migration declares: its name, SQL type, whether it admits NULL, its default, whether it is the primary key (and an identity column), and what it references.

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

Methods

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

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

def with(*, name: String = …, type: String = …, null: Bool = …, default: Int | Float | String | Bool | Bytes | Rotor::SQL::Raw | Nil = …, primary: Bool = …, identity: Bool = …, references: Rotor::Reference? = …) -> Rotor::ColumnDef

A copy with the fields given replaced.

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

def name -> String

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

def type -> String

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

def null -> Bool

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

def default -> Int | Float | String | Bool | Bytes | Rotor::SQL::Raw | Nil

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

def primary -> Bool

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

def identity -> Bool

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

def references -> Rotor::Reference?

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