class Avram::Migrator::Runner
- Avram::Migrator::Runner
- Reference
- Object
Extended Modules
- LuckyTask::TextHelpers
Defined in:
avram/migrator/runner.crConstant Summary
-
MIGRATIONS_TABLE_NAME =
"migrations"
Constructors
Class Method Summary
- .cmd_args
-
.cmd_args_array : Array(String)
Returns the DB connection args used for postgres in an array so you can pass them to
Process.run
- .create_db(quiet? : Bool = false)
- .credentials
- .db_host
- .db_name
- .db_password
- .db_port
- .db_user
- .drop_db(quiet? : Bool = false)
-
.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. - .migrations
- .restore_db(restore_file : String, quiet : Bool = false)
-
.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
- .run(command : String, args : Array(String), output : IO = STDOUT, input : Process::Stdio = Process::Redirect::Close)
- .setup_migration_tracking_tables
Instance Method Summary
- #ensure_migrated!
- #rollback_all
- #rollback_one
- #rollback_to(last_version : Int64)
- #run_next_migration
- #run_pending_migrations
Instance methods inherited from class Object
blank_for_validates_required? : Bool
blank_for_validates_required?
Constructor Detail
Class Method Detail
Returns the DB connection args used
for postgres in an array so you can pass
them to Process.run
Creates a new file at dump_to
with your database schema,
and includes the migtation data.
def self.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
def self.run(command : String, args : Array(String), output : IO = STDOUT, input : Process::Stdio = Process::Redirect::Close)
#