Commit 85cdde8d authored by Felipe's avatar Felipe

Migration - Remove position field from issues and merge requests

parent 2e3f0b08
......@@ -9,6 +9,9 @@ class Issue < ActiveRecord::Base
include Spammable
include FasterCacheKeys
include RelativePositioning
include IgnorableColumn
ignore_column :position
DueDateStruct =, :name).freeze
NoDueDate ='No Due Date', '0').freeze
......@@ -4,6 +4,9 @@ class MergeRequest < ActiveRecord::Base
include Noteable
include Referable
include Sortable
include IgnorableColumn
ignore_column :position
belongs_to :target_project, class_name: "Project"
belongs_to :source_project, class_name: "Project"
class RemovePositionFromIssuables < ActiveRecord::Migration
DOWNTIME = false
def change
remove_column :issues, :position, :integer
remove_column :merge_requests, :position, :integer
......@@ -11,7 +11,7 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170607121233) do
ActiveRecord::Schema.define(version: 20170609183112) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -547,7 +547,6 @@ ActiveRecord::Schema.define(version: 20170607121233) do
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "position", default: 0
t.string "branch_name"
t.text "description"
t.integer "milestone_id"
......@@ -738,7 +737,6 @@ ActiveRecord::Schema.define(version: 20170607121233) do
t.integer "target_project_id", null: false
t.integer "iid"
t.text "description"
t.integer "position", default: 0
t.datetime "locked_at"
t.integer "updated_by_id"
t.text "merge_error"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment