Commit 6c4770f5 authored by Tiger Watson's avatar Tiger Watson

Merge branch '338071-cleanup-push_event_payloads-bigint-conversion' into 'master'

Remove bigint conversion triggers for push_event_payloads

See merge request gitlab-org/gitlab!69339
parents 5d585f9c 7d5a2605
......@@ -2,6 +2,9 @@
class PushEventPayload < ApplicationRecord
extend SuppressCompositePrimaryKeyWarning
include IgnorableColumns
ignore_columns :event_id_convert_to_bigint, remove_with: '14.4', remove_after: '2021-10-22'
include ShaAttribute
......
# frozen_string_literal: true
class PushEventPayloadsBigintConversionRemoveTriggers < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
TABLE_NAME = :push_event_payloads
TRIGGER_NAME = 'trigger_07c94931164e'
# rubocop:disable Migration/WithLockRetriesDisallowedMethod
def up
check_trigger_permissions!(TABLE_NAME)
with_lock_retries do
remove_rename_triggers(TABLE_NAME, TRIGGER_NAME)
end
end
def down
check_trigger_permissions!(TABLE_NAME)
with_lock_retries do
install_rename_triggers(TABLE_NAME, :event_id, :event_id_convert_to_bigint, trigger_name: TRIGGER_NAME)
end
end
# rubocop:enable Migration/WithLockRetriesDisallowedMethod
end
1f070444e77eb56ba612f60ed4a0d90b8a44c4af419a09c873f3bf663c78af72
\ No newline at end of file
......@@ -52,15 +52,6 @@ RETURN NULL;
END
$$;
CREATE FUNCTION trigger_07c94931164e() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW."event_id_convert_to_bigint" := NEW."event_id";
RETURN NEW;
END;
$$;
CREATE FUNCTION trigger_21e7a2602957() RETURNS trigger
LANGUAGE plpgsql
AS $$
......@@ -26220,8 +26211,6 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey;
CREATE TRIGGER trigger_07c94931164e BEFORE INSERT OR UPDATE ON push_event_payloads FOR EACH ROW EXECUTE FUNCTION trigger_07c94931164e();
CREATE TRIGGER trigger_21e7a2602957 BEFORE INSERT OR UPDATE ON ci_build_needs FOR EACH ROW EXECUTE FUNCTION trigger_21e7a2602957();
CREATE TRIGGER trigger_3f6129be01d2 BEFORE INSERT OR UPDATE ON ci_builds FOR EACH ROW EXECUTE FUNCTION trigger_3f6129be01d2();
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