Commit 86b5340b authored by Michał Zając's avatar Michał Zając

Rename closed_by to dismissed_by in vulnerabilites

parent fee7c350
# frozen_string_literal: true
class RenameClosedByToDismissedByInVulnerabilities < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
rename_column_concurrently :vulnerabilities, :closed_by_id, :dismissed_by_id
end
def down
undo_rename_column_concurrently :vulnerabilities, :closed_by_id, :dismissed_by_id
end
end
# frozen_string_literal: true
class CleanupClosedByRenameInVulnerabilities < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
cleanup_concurrent_column_rename :vulnerabilities, :closed_by_id, :dismissed_by_id
end
def down
undo_cleanup_concurrent_column_rename :vulnerabilities, :closed_by_id, :dismissed_by_id
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_02_26_162239) do
ActiveRecord::Schema.define(version: 2020_02_26_162723) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
......@@ -4355,7 +4355,6 @@ ActiveRecord::Schema.define(version: 2020_02_26_162239) do
t.text "description_html"
t.bigint "start_date_sourcing_milestone_id"
t.bigint "due_date_sourcing_milestone_id"
t.bigint "closed_by_id"
t.integer "state", limit: 2, default: 1, null: false
t.integer "severity", limit: 2, null: false
t.boolean "severity_overridden", default: false
......@@ -4368,9 +4367,10 @@ ActiveRecord::Schema.define(version: 2020_02_26_162239) do
t.bigint "confirmed_by_id"
t.datetime_with_timezone "confirmed_at"
t.datetime_with_timezone "dismissed_at"
t.bigint "dismissed_by_id"
t.index ["author_id"], name: "index_vulnerabilities_on_author_id"
t.index ["closed_by_id"], name: "index_vulnerabilities_on_closed_by_id"
t.index ["confirmed_by_id"], name: "index_vulnerabilities_on_confirmed_by_id"
t.index ["dismissed_by_id"], name: "index_vulnerabilities_on_dismissed_by_id"
t.index ["due_date_sourcing_milestone_id"], name: "index_vulnerabilities_on_due_date_sourcing_milestone_id"
t.index ["epic_id"], name: "index_vulnerabilities_on_epic_id"
t.index ["last_edited_by_id"], name: "index_vulnerabilities_on_last_edited_by_id"
......@@ -5025,8 +5025,8 @@ ActiveRecord::Schema.define(version: 2020_02_26_162239) do
add_foreign_key "vulnerabilities", "milestones", name: "fk_131d289c65", on_delete: :nullify
add_foreign_key "vulnerabilities", "projects", name: "fk_efb96ab1e2", on_delete: :cascade
add_foreign_key "vulnerabilities", "users", column: "author_id", name: "fk_b1de915a15", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "closed_by_id", name: "fk_cf5c60acbf", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "confirmed_by_id", name: "fk_959d40ad0a", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "dismissed_by_id", name: "fk_725465b774", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "last_edited_by_id", name: "fk_1302949740", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "resolved_by_id", name: "fk_76bc5f5455", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "updated_by_id", name: "fk_7ac31eacb9", on_delete: :nullify
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment