From 47046fdd7cf96fde39d1f9ff45c41192acee4b12 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 3 Oct 2012 19:00:09 +0600 Subject: [PATCH] [refs #90] fixed migration for ActiveRecord::IrreversibleMigration --- ...20121003081546_rename_base_head_in_pull_requests.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/db/migrate/20121003081546_rename_base_head_in_pull_requests.rb b/db/migrate/20121003081546_rename_base_head_in_pull_requests.rb index 4e12b9696..73cdb4e8f 100644 --- a/db/migrate/20121003081546_rename_base_head_in_pull_requests.rb +++ b/db/migrate/20121003081546_rename_base_head_in_pull_requests.rb @@ -1,10 +1,8 @@ class RenameBaseHeadInPullRequests < ActiveRecord::Migration def change - change_table :pull_requests do |t| - t.rename :base_project_id, :to_project_id - t.rename :base_ref, :to_ref - t.rename :head_project_id, :from_project_id - t.rename :head_ref, :from_ref - end + rename_column :pull_requests, :base_project_id, :to_project_id + rename_column :pull_requests, :base_ref, :to_ref + rename_column :pull_requests, :head_project_id, :from_project_id + rename_column :pull_requests, :head_ref, :from_ref end end