summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-06 18:45:39 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-06 18:45:39 +0200
commit9d14c5137a5a82ed8edd353ac7e6ed701fc6f49d (patch)
treed6fdbeed76d6387fa4474c8ae3160b9a80440511 /db
parentd618a5fec361b85fafffd5cf4a53d044e82bdb5a (diff)
downloadgitlab-ce-9d14c5137a5a82ed8edd353ac7e6ed701fc6f49d.tar.gz
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>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20131106151520_remove_default_branch.rb9
-rw-r--r--db/schema.rb3
2 files changed, 10 insertions, 2 deletions
diff --git a/db/migrate/20131106151520_remove_default_branch.rb b/db/migrate/20131106151520_remove_default_branch.rb
new file mode 100644
index 00000000000..88a890eb3eb
--- /dev/null
+++ b/db/migrate/20131106151520_remove_default_branch.rb
@@ -0,0 +1,9 @@
+class RemoveDefaultBranch < ActiveRecord::Migration
+ def up
+ remove_column :projects, :default_branch
+ end
+
+ def down
+ add_column :projects, :default_branch, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d6acb2f90e9..88c6a545d96 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20131009115346) do
+ActiveRecord::Schema.define(:version => 20131106151520) do
create_table "deploy_keys_projects", :force => true do |t|
t.integer "deploy_key_id", :null => false
@@ -171,7 +171,6 @@ ActiveRecord::Schema.define(:version => 20131009115346) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "creator_id"
- 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