module Micrate
Defined in:
micrate.crmicrate/cli.cr
micrate/db.cr
micrate/migration.cr
micrate/statement_builder.cr
micrate/version.cr
Constant Summary
-
Log =
::Log.for(self)
-
VERSION =
"0.10.0"
Class Method Summary
- .connection_url=(connection_url)
- .create(name, dir, time)
- .db_dir
- .dbversion(db)
- .down(db)
-
.extract_dbversion(rows)
The most recent record for each migration specifies whether it has been applied or rolled back.
- .migration_plan(status : Hash(Migration, Time | Nil), current : Int, target : Int, direction)
- .migration_plan(all_versions : Hash(Int, Bool), current : Int, target : Int, direction)
- .migration_status(migrations : Array(Migration), db) : Hash(Migration, Time | Nil)
- .migration_status(db) : Hash(Migration, Time | Nil)
- .migrations_dir
- .redo(db)
- .up(db)
Class Method Detail
def self.extract_dbversion(rows)
#
The most recent record for each migration specifies whether it has been applied or rolled back. The first version we find that has been applied is the current version.
def self.migration_plan(status : Hash(Migration, Time | Nil), current : Int, target : Int, direction)
#
def self.migration_plan(all_versions : Hash(Int, Bool), current : Int, target : Int, direction)
#