gitlab-org--gitlab-foss/db/migrate/20131106151520_remove_default_branch.rb
Dmitriy Zaporozhets 9d14c5137a
Project#default_branch use repo HEAD instead of DB value now
Drop default_branch field from projects table
Use repository.root_ref as value for defautl_branch method
Fixes issue with default_branch and HEAD getting out of sync

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-06 18:45:39 +02:00

9 lines
185 B
Ruby

class RemoveDefaultBranch < ActiveRecord::Migration
def up
remove_column :projects, :default_branch
end
def down
add_column :projects, :default_branch, :string
end
end