Sha256: a8e5f712187082c4f5924c4a5105f5a36fa94baf5432e7c4ef439ce1c316f1a0

Contents?: true

Size: 1.24 KB

Versions: 20

Compression:

Stored size: 1.24 KB

Contents

class BetterIndexNames < ActiveRecord::Migration[4.2]
  def up
    rename_index :card_acts, "actor_id_index", "card_acts_actor_id_index"
    rename_index :card_acts, "card_id_index",  "card_acts_card_id_index"

    rename_index :card_actions, "card_act_id_index", "card_actions_card_act_id_index"
    rename_index :card_actions, "card_id_index",     "card_actions_card_id_index"

    rename_index :card_changes, "card_action_id_index",
                 "card_changes_card_action_id_index"

    rename_index :card_references, "wiki_references_referenced_card_id",
                 "card_references_referee_id_index"
    rename_index :card_references, "wiki_references_referenced_name",
                 "card_references_referee_key_index"
    rename_index :card_references, "wiki_references_card_id",
                 "card_references_referer_id_index"

    rename_index :cards, "cards_key_uniq",              "cards_key_index"
    rename_index :cards, "card_type_index",             "cards_type_id_index"
    rename_index :cards, "index_cards_on_trunk_id",     "cards_left_id_index"
    rename_index :cards, "index_cards_on_tag_id",       "cards_right_id_index"
    rename_index :cards, "index_cards_on_read_rule_id", "cards_read_rule_id_index"
  end

  def down; end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
card-1.105.6 db/migrate/20141216053032_better_index_names.rb
card-1.105.5 db/migrate/20141216053032_better_index_names.rb
card-1.105.4 db/migrate/20141216053032_better_index_names.rb
card-1.105.3 db/migrate/20141216053032_better_index_names.rb
card-1.105.2.pre1 db/migrate/20141216053032_better_index_names.rb
card-1.105.2 db/migrate/20141216053032_better_index_names.rb
card-1.105.1 db/migrate/20141216053032_better_index_names.rb
card-1.105.0 db/migrate/20141216053032_better_index_names.rb
card-1.104.2 db/migrate/20141216053032_better_index_names.rb
card-1.104.1 db/migrate/20141216053032_better_index_names.rb
card-1.104.0 db/migrate/20141216053032_better_index_names.rb
card-1.103.4 db/migrate/20141216053032_better_index_names.rb
card-1.103.3 db/migrate/20141216053032_better_index_names.rb
card-1.103.2 db/migrate/20141216053032_better_index_names.rb
card-1.103.1 db/migrate/20141216053032_better_index_names.rb
card-1.103.0 db/migrate/20141216053032_better_index_names.rb
card-1.101.7 db/migrate/20141216053032_better_index_names.rb
card-1.102.0 db/migrate/20141216053032_better_index_names.rb
card-1.101.6 db/migrate/20141216053032_better_index_names.rb
card-1.101.5 db/migrate/20141216053032_better_index_names.rb