Sha256: bbba569abc54028b1a56518885bee03e05ef218ceb2c793a30d8314e1cb36729

Contents?: true

Size: 367 Bytes

Versions: 12

Compression:

Stored size: 367 Bytes

Contents

module Swift
  class Scheme
    def self.migrations &migrations
      (class << self; self end).send :define_method, :migrate!, lambda{|db = Swift.db| migrations.call(db) }
    end

    def self.migrate! db = Swift.db
      db.migrate! self
    end
  end # Scheme

  def self.migrate! name = nil
    schema.each{|scheme| scheme.migrate!(db(name)) }
  end
end # Swift

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
swift-0.10.0 lib/swift/migrations.rb
swift-0.9.1 lib/swift/migrations.rb
swift-0.9.0 lib/swift/migrations.rb
swift-0.8.1 lib/swift/migrations.rb
swift-0.8.0 lib/swift/migrations.rb
swift-0.7.2 lib/swift/migrations.rb
swift-0.7.1 lib/swift/migrations.rb
swift-0.7.0 lib/swift/migrations.rb
swift-0.6.1 lib/swift/migrations.rb
swift-0.6.0 lib/swift/migrations.rb
swift-0.5.1 lib/swift/migrations.rb
swift-0.5.0 lib/swift/migrations.rb