module Jennifer::Migration::Runner
Overview
This modules is responsible for processing database migration operations like creation, dropping and migration.
Defined in:
jennifer/migration/runner.crClass Method Summary
-
.create(adapter : Adapter::Base = default_adapter)
Creates database using given adapter.
-
.drop(adapter : Adapter::Base = default_adapter)
Drops database using given adapter.
-
.load_schema
Loads schema from the SQL schema file.
-
.migrate(count : Int = -1)
Invokes migrations.
-
.pending_migration?
Returns whether pending migration exists.
-
.rollback(options : Hash(Symbol, DBAny))
Rollbacks migrations.
Class Method Detail
Creates database using given adapter.
If database already exists - do nothing.
By default use application default adapter.
Drops database using given adapter.
By default use application default adapter.
Invokes migrations. count with negative or zero value will invoke all pending migrations.
Returns whether pending migration exists.
Pending migration - known Jennifer::Migration::Base subclasses that hasn't been run.
Rollbacks migrations.
Allowed options:
- count - count of migrations to be rolled back
- to - migration timestamp to which database should be rolled back