2021-04-23 00:09:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class InitializeConversionOfCiSourcesPipelinesSourceJobIdToBigint < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
def up
|
|
|
|
# Foreign key that references ci_builds.id
|
|
|
|
initialize_conversion_of_integer_to_bigint :ci_sources_pipelines, :source_job_id
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
trigger_name = rename_trigger_name(:ci_sources_pipelines, :source_job_id, :source_job_id_convert_to_bigint)
|
|
|
|
|
2021-04-30 15:09:50 +00:00
|
|
|
remove_rename_triggers :ci_sources_pipelines, trigger_name
|
2021-04-23 00:09:47 +00:00
|
|
|
|
|
|
|
remove_column :ci_sources_pipelines, :source_job_id_convert_to_bigint
|
|
|
|
end
|
|
|
|
end
|