Commit 2ca0e62a authored by Krasimir Angelov's avatar Krasimir Angelov

Cleanup bigint conversion for geo_job_artifact_deleted_events

- remove column job_artifact_id_convert_to_bigint
- remove trigger_f1ca8ec18d78 trigger and function

https://gitlab.com/gitlab-org/gitlab/-/issues/338050

Changelog: other
parent 83c1861b
# frozen_string_literal: true
class CleanupBigintConversionForGeoJobArtifactDeletedEvents < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
TABLE = :geo_job_artifact_deleted_events
# rubocop:disable Migration/WithLockRetriesDisallowedMethod
def up
with_lock_retries do
cleanup_conversion_of_integer_to_bigint(TABLE, :job_artifact_id)
end
end
# rubocop:enable Migration/WithLockRetriesDisallowedMethod
def down
restore_conversion_of_integer_to_bigint(TABLE, :job_artifact_id)
end
end
23d4d2d037cd70c5b810824a837b45f016a3be5d112938123c1da08416f667cd
\ No newline at end of file
......@@ -144,15 +144,6 @@ BEGIN
END;
$$;
CREATE FUNCTION trigger_f1ca8ec18d78() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW."job_artifact_id_convert_to_bigint" := NEW."job_artifact_id";
RETURN NEW;
END;
$$;
CREATE TABLE audit_events (
id bigint NOT NULL,
author_id integer NOT NULL,
......@@ -14113,7 +14104,6 @@ ALTER SEQUENCE geo_hashed_storage_migrated_events_id_seq OWNED BY geo_hashed_sto
CREATE TABLE geo_job_artifact_deleted_events (
id bigint NOT NULL,
job_artifact_id_convert_to_bigint integer DEFAULT 0 NOT NULL,
file_path character varying NOT NULL,
job_artifact_id bigint NOT NULL
);
......@@ -27330,8 +27320,6 @@ CREATE TRIGGER trigger_aebe8b822ad3 BEFORE INSERT OR UPDATE ON taggings FOR EACH
CREATE TRIGGER trigger_cf2f9e35f002 BEFORE INSERT OR UPDATE ON ci_build_trace_chunks FOR EACH ROW EXECUTE FUNCTION trigger_cf2f9e35f002();
CREATE TRIGGER trigger_f1ca8ec18d78 BEFORE INSERT OR UPDATE ON geo_job_artifact_deleted_events FOR EACH ROW EXECUTE FUNCTION trigger_f1ca8ec18d78();
CREATE TRIGGER trigger_has_external_issue_tracker_on_delete AFTER DELETE ON integrations FOR EACH ROW WHEN ((((old.category)::text = 'issue_tracker'::text) AND (old.active = true) AND (old.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_issue_tracker();
CREATE TRIGGER trigger_has_external_issue_tracker_on_insert AFTER INSERT ON integrations FOR EACH ROW WHEN ((((new.category)::text = 'issue_tracker'::text) AND (new.active = true) AND (new.project_id IS NOT NULL))) EXECUTE FUNCTION set_has_external_issue_tracker();
......@@ -984,6 +984,7 @@ module Gitlab
temporary_columns.each { |column| remove_column(table, column) }
end
alias_method :cleanup_conversion_of_integer_to_bigint, :revert_initialize_conversion_of_integer_to_bigint
# Reverts `cleanup_conversion_of_integer_to_bigint`
#
......
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