Commit 2de6a4f4 authored by Krasimir Angelov's avatar Krasimir Angelov

Drop old int4 PK column for events

- Drop column `id_convert_to_bigint`

Column was ignored with
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69337.

https://gitlab.com/gitlab-org/gitlab/-/issues/338072

Changelog: other
parent a1b4d1fe
# frozen_string_literal: true
class DropInt4ColumnForEvents < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
remove_column :events, :id_convert_to_bigint, :integer, null: false, default: 0
end
end
011b714ee5d4389a5a172ae687eea3a814915fb39a5e5eae38b6ee423a903eaf
\ No newline at end of file
......@@ -13734,7 +13734,6 @@ CREATE SEQUENCE error_tracking_errors_id_seq
ALTER SEQUENCE error_tracking_errors_id_seq OWNED BY error_tracking_errors.id;
CREATE TABLE events (
id_convert_to_bigint integer DEFAULT 0 NOT NULL,
project_id integer,
author_id integer NOT NULL,
target_id integer,
# frozen_string_literal: true
require 'spec_helper'
require_migration!('drop_int4_column_for_events')
RSpec.describe DropInt4ColumnForEvents do
let(:events) { table(:events) }
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(events.column_names).to include('id_convert_to_bigint')
}
migration.after -> {
events.reset_column_information
expect(events.column_names).not_to include('id_convert_to_bigint')
}
end
end
end
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