gitlabhq/db/migrate/20120905043334_set_default_branch_default_to_nil.rb

13 lines
401 B
Ruby
Raw Normal View History

class SetDefaultBranchDefaultToNil < ActiveRecord::Migration
def up
# Set the default_branch to allow nil, and default it to nil
change_column_null(:projects, :default_branch, true)
change_column_default(:projects, :default_branch, nil)
end
def down
change_column_null(:projects, :default_branch, false)
change_column_default(:projects, :default_branch, 'master')
end
end