Sha256: c1003bede5d58f9dc42eba25b00b4bdbd4504d02d98fe5f499fdc3cfefe7bbd6

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 Bytes

Contents

require 'sequel/extensions/migration'

module SequelRails
  class Migrations
    class << self
      def migrate(version=nil)
        opts = {}
        opts[:target] = version.to_i if version
        ::Sequel::Migrator.run(::Sequel::Model.db, "db/migrate", opts)
      end
      alias_method :migrate_up!, :migrate
      alias_method :migrate_down!, :migrate

      def pending_migrations?
        return false unless File.exists?("db/migrate")
        !::Sequel::Migrator.is_current?(::Sequel::Model.db, "db/migrate")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sequel-rails-0.4.2 lib/sequel_rails/migrations.rb
sequel-rails-0.4.1 lib/sequel_rails/migrations.rb
sequel-rails-0.4.0 lib/sequel_rails/migrations.rb