Sha256: 280efd1b2e42bd69a1ac720a6819eb58100327266cee3ec014c1d5f14bd74e59
Contents?: true
Size: 659 Bytes
Versions: 14
Compression:
Stored size: 659 Bytes
Contents
module Apartment module Migrator extend self # Migrate to latest def migrate(database) Database.process(database){ ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_path) } end # Migrate up/down to a specific version def run(direction, database, version) Database.process(database){ ActiveRecord::Migrator.run(direction, ActiveRecord::Migrator.migrations_path, version) } end # rollback latest migration `step` number of times def rollback(database, step = 1) Database.process(database){ ActiveRecord::Migrator.rollback(ActiveRecord::Migrator.migrations_path, step) } end end end
Version data entries
14 entries across 14 versions & 1 rubygems