Permalink
Browse files

Index name should not exceed 64 characters

  • Loading branch information...
1 parent 251b151 commit 180deda41f83507e23a2804767043a79507d5649 Arnold Putong committed Sep 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/generators/banyan/templates/migration.rb
View
4 lib/generators/banyan/templates/migration.rb
@@ -22,7 +22,7 @@ def self.up
t.integer :category_id
t.references :categorizable, :polymorphic => true
end
- add_index :banyan_categorizations, [:categorizable_id, :categorizable_type]
+ add_index :banyan_categorizations, [:categorizable_id, :categorizable_type], :name => 'index_banyan_categorizations_on_categorizable'
create_table :banyan_category_groups do |t|
t.string :tag
@@ -32,7 +32,7 @@ def self.up
t.integer :rgt
end
add_index :banyan_category_groups, :tag, :unique => true
- add_index :banyan_category_groups, [:group_categorizable_id, :group_categorizable_type]
+ add_index :banyan_category_groups, [:group_categorizable_id, :group_categorizable_type], :name => 'index_banyan_category_groups_on_group_categorizable'
add_index :banyan_category_groups, :parent_id
add_index :banyan_category_groups, :lft
add_index :banyan_category_groups, :rgt

0 comments on commit 180deda

Please sign in to comment.