Sha256: 21d84dc15f28b433ca5e91d25fc13bdad1dbc95e866c8412d1da7a409676187b

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 Bytes

Contents

module ROM
  module SQL
    class Migration
      ::Sequel.extension :migration

      DEFAULT_PATH = 'db/migrate'

      class << self
        attr_writer :path
        attr_accessor :connection

        def path
          @path || DEFAULT_PATH
        end

        def run(options = {})
          ::Sequel::Migrator.run(connection, path, options)
        end

        def create(&block)
          ::Sequel.migration(&block)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rom-sql-0.4.0 lib/rom/sql/migration.rb
rom-sql-0.4.0.rc1 lib/rom/sql/migration.rb
rom-sql-0.4.0.beta2 lib/rom/sql/migration.rb
rom-sql-0.4.0.beta1 lib/rom/sql/migration.rb