Sha256: 392b9f1b2b55dce1da7c01b168a291eeaa003e86fededa18eaab9fb00420d2b0

Contents?: true

Size: 395 Bytes

Versions: 10

Compression:

Stored size: 395 Bytes

Contents

class DataloadMigration < ActiveRecord::Migration
  class << self
    attr_accessor :cols, :table_name, :b
    include FromHash
  end
  def self.new_migration(ops,&b)
    cls = Class.new(DataloadMigration)
    cls.from_hash(ops)
    cls.b = b
    cls.class_eval do
      def self.up
        instance_eval(&b)
        Dataload.log "Created table #{table_name}"
      end
    end
    cls
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
GFunk911-dataload-0.8.0 lib/dataload/migration.rb
GFunk911-dataload-0.8.1 lib/dataload/migration.rb
GFunk911-dataload-0.8.2 lib/dataload/migration.rb
GFunk911-dataload-0.8.3 lib/dataload/migration.rb
GFunk911-dataload-0.8.4 lib/dataload/migration.rb
GFunk911-dataload-0.8.5 lib/dataload/migration.rb
GFunk911-dataload-0.9.0 lib/dataload/migration.rb
GFunk911-dataload-0.9.1 lib/dataload/migration.rb
GFunk911-dataload-0.9.2 lib/dataload/migration.rb
GFunk911-dataload-0.9.4 lib/dataload/migration.rb