Commit 2466d7a7 authored by Shinya Maeda's avatar Shinya Maeda Committed by Mayra Cabrera

Drop id column in ci_build_trace_sections table

This commit drops the id column of the `ci_build_trace_sections`
table, which is about to overflow.
parent cc0cc46e
---
title: Drop `id` column from `ci_build_trace_sections` table
merge_request: 18741
author:
type: changed
# frozen_string_literal: true
class DropCiBuildTraceSectionsId < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
##
# This column has already been ignored since 12.4
# See https://gitlab.com/gitlab-org/gitlab/issues/32569
remove_column :ci_build_trace_sections, :id
end
def down
##
# We don't backfill serial ids as it's not used in application code
# and quite expensive process.
add_column :ci_build_trace_sections, :id, :bigint
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_10_17_094449) do
ActiveRecord::Schema.define(version: 2019_10_17_180026) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
......@@ -599,7 +599,7 @@ ActiveRecord::Schema.define(version: 2019_10_17_094449) do
t.index ["project_id", "name"], name: "index_ci_build_trace_section_names_on_project_id_and_name", unique: true
end
create_table "ci_build_trace_sections", id: :serial, force: :cascade do |t|
create_table "ci_build_trace_sections", id: false, force: :cascade do |t|
t.integer "project_id", null: false
t.datetime "date_start", null: false
t.datetime "date_end", null: false
......
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