Commit 17b1b5f5 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '338059-ci-sources-pipelines-step-3-2-remove-columns' into 'master'

Drop old int4 PK columns for ci_sources_pipelines

See merge request gitlab-org/gitlab!70896
parents 41661929 fecfc177
# frozen_string_literal: true
class DropInt4ColumnForCiSourcesPipelines < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
remove_column :ci_sources_pipelines, :source_job_id_convert_to_bigint, :integer
end
end
43b02083323765888f019386138e8fbaa3182d74bd5e8790d6fae6ea6f0a2104
\ No newline at end of file
...@@ -11992,7 +11992,6 @@ CREATE TABLE ci_sources_pipelines ( ...@@ -11992,7 +11992,6 @@ CREATE TABLE ci_sources_pipelines (
project_id integer, project_id integer,
pipeline_id integer, pipeline_id integer,
source_project_id integer, source_project_id integer,
source_job_id_convert_to_bigint integer,
source_pipeline_id integer, source_pipeline_id integer,
source_job_id bigint source_job_id bigint
); );
# frozen_string_literal: true
require 'spec_helper'
require_migration!('drop_int4_column_for_ci_sources_pipelines')
RSpec.describe DropInt4ColumnForCiSourcesPipelines do
let(:ci_sources_pipelines) { table(:ci_sources_pipelines) }
it 'correctly migrates up and down' do
reversible_migration do |migration|
migration.before -> {
expect(ci_sources_pipelines.column_names).to include('source_job_id_convert_to_bigint')
}
migration.after -> {
ci_sources_pipelines.reset_column_information
expect(ci_sources_pipelines.column_names).not_to include('source_job_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