Convert ci_builds_runner_session.build_id to bigint - Step 2: Finalize background migrations and swap columns
With #328444 (closed) we have started the process of converting the foreign key from ci_builds_runner_session
that references ci_builds
(ci_builds_runner_session.build_id
) to bigint
(int8
).
In this issue we'll address the second step of the process:
-
Clean up the background migrations
-
Drop the
DEFAULT 0
from thebuild_id_convert_to_bigint
column -
Concurrently add any secondary indexes that include the
build_id
column"index_ci_builds_runner_session_on_build_id" UNIQUE, btree (build_id)
-
Single Transaction: Drop old FK, define new FK (as invalid), swap columns, validate FK
Edited by Yannis Roussos