class

Avram::Migrator::Runner

Inherits Reference < Object

Constants

MIGRATIONS_TABLE_NAME = "migrations"

Constructors

new(quiet : Bool = false)
Source

Class methods

cmd_args
Source
cmd_args_array

Returns the DB connection args used for postgres in an array so you can pass them to Process.run

Source
create_db(quiet : Bool = false)
Source
credentials
Source
db_host
Source
db_name
Source
db_password
Source
db_port
Source
db_user
Source
drop_db(quiet : Bool = false)
Source
dump_db(dump_to : String = "db/structure.sql", quiet : Bool = false)

Creates a new file at dump_to with your database schema, and includes the migtation data.

Source
migrations
Source
restore_db(restore_file : String, quiet : Bool = false)
Source
run(command : String, output : IO = STDOUT, input : Process::Stdio = Process::Redirect::Close)

DEPRECATED Calling run with a single string is deprecated. Pass the args as a separate Array

Source
run(command : String, args : Array(String), output : IO = STDOUT, input : Process::Stdio = Process::Redirect::Close)
Source
setup_migration_tracking_tables
Source

Instance methods

ensure_migrated!
Source
rollback_all
Source
rollback_one
Source
rollback_to(last_version : Int64)
Source
run_next_migration
Source
run_pending_migrations
Source