Migration - Remove position field from issues and merge requests
This commit is contained in:
parent
2e3f0b08fb
commit
85cdde8d33
|
@ -9,6 +9,9 @@ class Issue < ActiveRecord::Base
|
|||
include Spammable
|
||||
include FasterCacheKeys
|
||||
include RelativePositioning
|
||||
include IgnorableColumn
|
||||
|
||||
ignore_column :position
|
||||
|
||||
DueDateStruct = Struct.new(:title, :name).freeze
|
||||
NoDueDate = DueDateStruct.new('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"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
class RemovePositionFromIssuables < ActiveRecord::Migration
|
||||
DOWNTIME = false
|
||||
|
||||
def change
|
||||
remove_column :issues, :position, :integer
|
||||
remove_column :merge_requests, :position, :integer
|
||||
end
|
||||
end
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue