index for commit_id. Schema rebuiled. Non rollback migration exception added
This commit is contained in:
parent
96af55bb85
commit
69c8231b49
3 changed files with 20 additions and 13 deletions
|
@ -15,7 +15,6 @@ class MoveNoteableCommitToOwnField < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
def down
|
||||
remove_column :notes, :commit_id
|
||||
remove_column :notes, :new_noteable_id
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
|
|
6
db/migrate/20121219095402_indices_for_notes.rb
Normal file
6
db/migrate/20121219095402_indices_for_notes.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class IndicesForNotes < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :notes, :commit_id
|
||||
add_index :notes, [:project_id, :noteable_type]
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue