Commit 69c8231b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

index for commit_id. Schema rebuiled. Non rollback migration exception added

parent 96af55bb
...@@ -15,7 +15,6 @@ class MoveNoteableCommitToOwnField < ActiveRecord::Migration ...@@ -15,7 +15,6 @@ class MoveNoteableCommitToOwnField < ActiveRecord::Migration
end end
def down def down
remove_column :notes, :commit_id raise ActiveRecord::IrreversibleMigration
remove_column :notes, :new_noteable_id
end end
end end
class IndicesForNotes < ActiveRecord::Migration
def change
add_index :notes, :commit_id
add_index :notes, [:project_id, :noteable_type]
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20121218164840) do ActiveRecord::Schema.define(:version => 20121219095402) do
create_table "events", :force => true do |t| create_table "events", :force => true do |t|
t.string "target_type" t.string "target_type"
...@@ -78,8 +78,8 @@ ActiveRecord::Schema.define(:version => 20121218164840) do ...@@ -78,8 +78,8 @@ ActiveRecord::Schema.define(:version => 20121218164840) do
t.boolean "closed", :default => false, :null => false t.boolean "closed", :default => false, :null => false
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.text "st_commits" t.text "st_commits", :limit => 2147483647
t.text "st_diffs" t.text "st_diffs", :limit => 2147483647
t.boolean "merged", :default => false, :null => false t.boolean "merged", :default => false, :null => false
t.integer "state", :default => 1, :null => false t.integer "state", :default => 1, :null => false
t.integer "milestone_id" t.integer "milestone_id"
...@@ -135,8 +135,10 @@ ActiveRecord::Schema.define(:version => 20121218164840) do ...@@ -135,8 +135,10 @@ ActiveRecord::Schema.define(:version => 20121218164840) do
t.integer "noteable_id" t.integer "noteable_id"
end end
add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id"
add_index "notes", ["created_at"], :name => "index_notes_on_created_at" add_index "notes", ["created_at"], :name => "index_notes_on_created_at"
add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type" add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type"
add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type"
add_index "notes", ["project_id"], :name => "index_notes_on_project_id" add_index "notes", ["project_id"], :name => "index_notes_on_project_id"
create_table "projects", :force => true do |t| create_table "projects", :force => true do |t|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment