Sha256: f0f60ef8085fdf49324a4d3d4b09b9cc9044e9635ec7b2cbd760f5a695de0abe

Contents?: true

Size: 616 Bytes

Versions: 13

Compression:

Stored size: 616 Bytes

Contents

namespace :db do
  
  desc "Migrate the database through scripts in db/migrations."
  task :migrate => "mack:environment" do
    Mack::Database::Migrations.migrate
  end # migrate
  
  desc "Rolls the schema back to the previous version. Specify the number of steps with STEP=n."
  task :rollback => ["mack:environment", "db:abort_if_pending_migrations"] do
    Mack::Database::Migrations.rollback((ENV["STEP"] || 1).to_i)
  end # rollback
  
  desc "Raises an error if there are pending migrations."
  task :abort_if_pending_migrations do
    Mack::Database::Migrations.abort_if_pending_migrations
  end
  
end # db

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mack-orm-0.7.0 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.0.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.0.2 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.3.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.7.0.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.7.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.7.1.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.0 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.0.101 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.0.3 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.1 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.2 lib/mack-orm/tasks/db_migration_tasks.rake
mack-orm-0.8.3 lib/mack-orm/tasks/db_migration_tasks.rake