Prepare ci_builds_metadata for int8 migration
What does this MR do?
This prepares to migrate ci_builds_metadata.id
to int8
. See #325616 (closed).
Migration: Up
== 20210519132109 InitializeConversionOfCiBuildsMetadataToBigint: migrating ===
-- table_exists?(:ci_builds_metadata)
-> 0.0010s
-- column_exists?(:ci_builds_metadata, :id)
-> 0.0011s
-- column_exists?(:ci_builds_metadata, :build_id)
-> 0.0007s
-- columns(:ci_builds_metadata)
-> 0.0008s
-- add_column(:ci_builds_metadata, "build_id_convert_to_bigint", :bigint, {:default=>0, :null=>false})
-> 0.0011s
== 20210519132109 InitializeConversionOfCiBuildsMetadataToBigint: migrated (0.0120s)
== 20210519132129 BackfillCiBuildsMetadataForBigintConversion: migrating ======
-- table_exists?(:ci_builds_metadata)
-> 0.0010s
-- column_exists?(:ci_builds_metadata, :id)
-> 0.0011s
-- column_exists?(:ci_builds_metadata, :build_id)
-> 0.0008s
-- column_exists?(:ci_builds_metadata, "build_id_convert_to_bigint")
-> 0.0007s
unknown OID 28: failed to recognize type of 'relfrozenxid'. It will be treated as String.
unknown OID 1034: failed to recognize type of 'relacl'. It will be treated as String.
unknown OID 194: failed to recognize type of 'relpartbound'. It will be treated as String.
== 20210519132129 BackfillCiBuildsMetadataForBigintConversion: migrated (0.0406s)
Migration: Down
== 20210519132129 BackfillCiBuildsMetadataForBigintConversion: reverting ======
-- execute("DELETE FROM batched_background_migrations WHERE job_class_name = 'CopyColumnUsingBackgroundMigrationJob' AND table_name = 'ci_builds_metadata' AND column_name = 'id' AND job_arguments = '[[\"build_id\"],[\"build_id_convert_to_bigint\"]]'")
-> 0.0016s
== 20210519132129 BackfillCiBuildsMetadataForBigintConversion: reverted (0.0018s)
== 20210519132109 InitializeConversionOfCiBuildsMetadataToBigint: reverting ===
-- remove_column(:ci_builds_metadata, "build_id_convert_to_bigint")
-> 0.0008s
== 20210519132109 InitializeConversionOfCiBuildsMetadataToBigint: reverted (0.0034s)
Does this MR meet the acceptance criteria?
Conformity
-
I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Edited by Andreas Brandl