Finalize converting geo_job_artifact_deleted_events

What does this MR do?

This MR finalizes the conversion to bigint for the geo_job_artifact_deleted_events table, following the pattern in !64779 (merged)

#334833 (closed)

Timings

create index concurrently index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint ON geo_job_artifact_deleted_events(job_artifact_id);

  • 17ms. (database lab) This table is empty on database lab. I believe entries are removed from it as they are processed, so this makes sense.

Migration Output

Up
== 20210722155635 FinalizeConvertGeoJobArtifactDeletedEventsBigint: migrating =
-- transaction_open?()
   -> 0.0000s
-- index_exists?("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", {:name=>"index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", :algorithm=>:concurrently})
   -> 0.0019s
-- execute("SET statement_timeout TO 0")
   -> 0.0005s
-- add_index("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", {:name=>"index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", :algorithm=>:concurrently})
   -> 0.0066s
-- execute("RESET ALL")
   -> 0.0006s
-- execute("LOCK TABLE geo_job_artifact_deleted_events IN ACCESS EXCLUSIVE MODE")
   -> 0.0005s
-- quote_column_name("job_artifact_id_tmp")
   -> 0.0000s
-- quote_column_name("job_artifact_id")
   -> 0.0000s
-- quote_column_name("job_artifact_id_convert_to_bigint")
   -> 0.0000s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id\" TO \"job_artifact_id_tmp\"")
   -> 0.0006s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id_convert_to_bigint\" TO \"job_artifact_id\"")
   -> 0.0005s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id_tmp\" TO \"job_artifact_id_convert_to_bigint\"")
   -> 0.0005s
-- change_column_default("geo_job_artifact_deleted_events", "job_artifact_id", nil)
   -> 0.0018s
-- change_column_default("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", 0)
   -> 0.0016s
-- quote_table_name("trigger_f1ca8ec18d78")
   -> 0.0000s
-- execute("ALTER FUNCTION \"trigger_f1ca8ec18d78\" RESET ALL")
   -> 0.0006s
-- execute("DROP INDEX index_geo_job_artifact_deleted_events_on_job_artifact_id")
   -> 0.0006s
-- rename_index("geo_job_artifact_deleted_events", "index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", "index_geo_job_artifact_deleted_events_on_job_artifact_id")
   -> 0.0006s
== 20210722155635 FinalizeConvertGeoJobArtifactDeletedEventsBigint: migrated (0.0396s) 
Down
== 20210722155635 FinalizeConvertGeoJobArtifactDeletedEventsBigint: reverting =
-- transaction_open?()
   -> 0.0000s
-- index_exists?("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", {:name=>"index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", :algorithm=>:concurrently})
   -> 0.0028s
-- execute("SET statement_timeout TO 0")
   -> 0.0005s
-- add_index("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", {:name=>"index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", :algorithm=>:concurrently})
   -> 0.0046s
-- execute("RESET ALL")
   -> 0.0005s
-- execute("LOCK TABLE geo_job_artifact_deleted_events IN ACCESS EXCLUSIVE MODE")
   -> 0.0005s
-- quote_column_name("job_artifact_id_tmp")
   -> 0.0000s
-- quote_column_name("job_artifact_id")
   -> 0.0000s
-- quote_column_name("job_artifact_id_convert_to_bigint")
   -> 0.0000s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id\" TO \"job_artifact_id_tmp\"")
   -> 0.0005s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id_convert_to_bigint\" TO \"job_artifact_id\"")
   -> 0.0005s
-- execute("ALTER TABLE geo_job_artifact_deleted_events RENAME COLUMN \"job_artifact_id_tmp\" TO \"job_artifact_id_convert_to_bigint\"")
   -> 0.0005s
-- change_column_default("geo_job_artifact_deleted_events", "job_artifact_id", nil)
   -> 0.0017s
-- change_column_default("geo_job_artifact_deleted_events", "job_artifact_id_convert_to_bigint", 0)
   -> 0.0017s
-- quote_table_name("trigger_f1ca8ec18d78")
   -> 0.0000s
-- execute("ALTER FUNCTION \"trigger_f1ca8ec18d78\" RESET ALL")
   -> 0.0006s
-- execute("DROP INDEX index_geo_job_artifact_deleted_events_on_job_artifact_id")
   -> 0.0006s
-- rename_index("geo_job_artifact_deleted_events", "index_geo_job_artifact_deleted_events_on_job_artifact_id_bigint", "index_geo_job_artifact_deleted_events_on_job_artifact_id")
   -> 0.0006s
== 20210722155635 FinalizeConvertGeoJobArtifactDeletedEventsBigint: reverted (0.0257s) 

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Michael Kozono