Sha256: 9df7456d350db75c2e277067fb0e518cb6d8906bf9ee5d2f2b51eaa4d8ccf3b8

Contents?: true

Size: 996 Bytes

Versions: 30

Compression:

Stored size: 996 Bytes

Contents

class RefactorAbstractorRuleTypes < ActiveRecord::Migration
  def up
    create_table :abstractor_abstraction_source_types do |t|
      t.string :name
      t.datetime :deleted_at
      t.timestamps
    end

    add_column :abstractor_abstraction_sources, :abstractor_abstraction_source_type_id, :integer
    add_column :abstractor_abstraction_sources, :abstractor_rule_type_id, :integer
    remove_column :abstractor_subjects, :abstractor_rule_type_id

    create_table  :abstractor_indirect_sources do |t|
      t.integer   :abstractor_abstraction_id
      t.integer   :abstractor_abstraction_source_id
      t.string    :source_type
      t.integer   :source_id
      t.string    :source_method
      t.datetime  :deleted_at
      t.timestamps
    end
  end

  def down
    drop_table :abstractor_abstraction_source_types
    remove_column :abstractor_abstraction_sources, :abstractor_abstraction_source_type_id
    add_column :abstractor_subjects, :abstractor_rule_type_id, :integer
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
abstractor-4.4.7 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.6 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.5 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.4 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.3 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.2 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.1 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.4.0 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.3.3 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.3.2 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.3.1 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.3.0 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.2.3 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.2.2 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.2.1 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.2.0 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.1.5 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.1.4 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.1.3 db/migrate/20140718014952_refactor_abstractor_rule_types.rb
abstractor-4.1.2 db/migrate/20140718014952_refactor_abstractor_rule_types.rb