module Micrate

Defined in:

micrate.cr
micrate/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

Class Method Detail

def self.connection_url=(connection_url) #

[View source]
def self.create(name, dir, time) #

[View source]
def self.db_dir #

[View source]
def self.dbversion(db) #

[View source]
def self.down(db) #

[View source]
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.


[View source]
def self.migration_plan(status : Hash(Migration, Time | Nil), current : Int, target : Int, direction) #

[View source]
def self.migration_plan(all_versions : Hash(Int, Bool), current : Int, target : Int, direction) #

[View source]
def self.migration_status(migrations : Array(Migration), db) : Hash(Migration, Time | Nil) #

[View source]
def self.migration_status(db) : Hash(Migration, Time | Nil) #

[View source]
def self.migrations_dir #

[View source]
def self.redo(db) #

[View source]
def self.up(db) #

[View source]