Sha256: 795fa507fe7a03572de2aafab3a3ed106b0f123cfbb8fd024b83eeaa578eab22

Contents?: true

Size: 521 Bytes

Versions: 6

Compression:

Stored size: 521 Bytes

Contents

class AddRestrictionsToGreenFlagRules < ActiveRecord::Migration
  def up
    change_column :green_flag_rules, :group_key, :string, null: false
    change_column :green_flag_rules, :feature_id, :integer, null: false
    add_index :green_flag_rules, [:feature_id, :group_key], :unique => true
  end

  def down
    remove_index :green_flag_rules, [:feature_id, :group_key]
    change_column :green_flag_rules, :group_key, :string, null: true
    change_column :green_flag_rules, :feature_id, :integer, null: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
green_flag-0.4.0 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb
green_flag-0.3.0 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb
green_flag-0.2.0 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb
green_flag-0.1.2 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb
green_flag-0.1.1 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb
green_flag-0.1.0 db/migrate/20140516214909_add_restrictions_to_green_flag_rules.rb