abstract class Avram::Migrator::Migration::V1
- Avram::Migrator::Migration::V1
- Reference
- Object
Included Modules
Defined in:
avram/migrator/migration.crInstance Method Summary
-
#down(quiet = false)
Same as #up except calls rollback method in migration.
- #migrate
- #migrated?
- #pending?
- #prepared_statements : Array(String)
- #reset_prepared_statements
-
#up(quiet = false)
Unless already migrated, calls migrate which in turn calls statement helpers to generate and collect SQL statements in the @prepared_statements array.
- #version
Instance methods inherited from module Avram::Migrator::StatementHelpers
create_foreign_key(from : Symbol, to : Symbol, on_delete : Symbol, column : Symbol | Nil, primary_key = :id)
create_foreign_key,
create_index(table_name : Symbol, columns : Columns, unique = false, using = :btree)
create_index,
drop(table_name)
drop,
drop_index(table_name : Symbol, columns : Columns, if_exists = false, on_delete = :do_nothing)
drop_index,
make_optional(table : Symbol, column : Symbol)
make_optional,
make_required(table : Symbol, column : Symbol)
make_required
Instance methods inherited from module Avram::Migrator::IndexStatementHelpers
add_index(column : Symbol, unique = false, using : Symbol = :btree)
add_index,
index_added?(index : String, column : Symbol)
index_added?
Instance methods inherited from class Object
blank_for_validates_required? : Bool
blank_for_validates_required?
Instance Method Detail
def up(quiet = false)
#
Unless already migrated, calls migrate which in turn calls statement helpers to generate and collect SQL statements in the @prepared_statements array. Each statement is then executed in a transaction and tracked upon completion.