Commit 8218ffdf authored by Patrick Bair's avatar Patrick Bair

Merge branch '338072-events-cleanup-step-3-2-remove-columns' into 'master'

Drop old int4 PK column for events

See merge request gitlab-org/gitlab!70915
parents b64ace02 2de6a4f4
# 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
......@@ -13703,7 +13703,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