# private_flag :boolean(1) default(TRUE), not null
# code :string(255)
# owner_id :integer(4)
-# default_branch :string(255) default("master"), not null
+# default_branch :string(255)
# issues_enabled :boolean(1) default(TRUE), not null
# wall_enabled :boolean(1) default(TRUE), not null
# merge_requests_enabled :boolean(1) default(TRUE), not null
--- /dev/null
+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
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120729131232) do
+ActiveRecord::Schema.define(:version => 20120905043334) do
create_table "events", :force => true do |t|
t.string "target_type"
t.string "name"
t.string "path"
t.text "description"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.boolean "private_flag", :default => true, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "private_flag", :default => true, :null => false
t.string "code"
t.integer "owner_id"
- t.string "default_branch", :default => "master", :null => false
- t.boolean "issues_enabled", :default => true, :null => false
- t.boolean "wall_enabled", :default => true, :null => false
- t.boolean "merge_requests_enabled", :default => true, :null => false
- t.boolean "wiki_enabled", :default => true, :null => false
+ t.string "default_branch"
+ t.boolean "issues_enabled", :default => true, :null => false
+ t.boolean "wall_enabled", :default => true, :null => false
+ t.boolean "merge_requests_enabled", :default => true, :null => false
+ t.boolean "wiki_enabled", :default => true, :null => false
end
create_table "protected_branches", :force => true do |t|