summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authormicael.bergeron <micaelbergeron@gmail.com>2017-11-01 10:31:35 -0400
committermicael.bergeron <micaelbergeron@gmail.com>2017-11-03 08:13:11 -0400
commitcd88fa8f80710ec977a85ab8701570073c94f017 (patch)
tree8866f616741d7a3f7f35f6e37b2e01503804b2a2 /db
parent8c01f3110c8d8601fc16b17850dfa778f1f3d877 (diff)
downloadgitlab-ce-cd88fa8f80710ec977a85ab8701570073c94f017.tar.gz
removed the #ensure_ref_fetched from all controllers
also, I refactored the MergeRequest#fetch_ref method to express the side-effect that this method has. MergeRequest#fetch_ref -> MergeRequest#fetch_ref! Repository#fetch_source_branch -> Repository#fetch_source_branch!
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb14
-rw-r--r--db/schema.rb3
2 files changed, 15 insertions, 2 deletions
diff --git a/db/migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb b/db/migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb
new file mode 100644
index 00000000000..acba8384da4
--- /dev/null
+++ b/db/migrate/20171101134435_remove_ref_fetched_from_merge_requests.rb
@@ -0,0 +1,14 @@
+class RemoveRefFetchedFromMergeRequests < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ # Set this constant to true if this migration requires downtime.
+ DOWNTIME = false
+
+ # We don't need to cache this anymore: the refs are now created
+ # upon save/update and there is no more use for this flag
+ #
+ # See https://gitlab.com/gitlab-org/gitlab-ce/issues/36061
+ def change
+ remove_column :merge_requests, :ref_fetched
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 80d8ff92d6e..7f1cfed4bb8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20171026082505) do
+ActiveRecord::Schema.define(version: 20171101134435) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -970,7 +970,6 @@ ActiveRecord::Schema.define(version: 20171026082505) do
t.datetime "last_edited_at"
t.integer "last_edited_by_id"
t.integer "head_pipeline_id"
- t.boolean "ref_fetched"
t.string "merge_jid"
t.boolean "discussion_locked"
t.integer "latest_merge_request_diff_id"