Commit 8cb90996 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '338072-cleanup-events-bigint-conversion' into 'master'

Remove bigint conversion triggers for events

See merge request gitlab-org/gitlab!69337
parents 28c1cf25 bfd5ac61
......@@ -9,6 +9,9 @@ class Event < ApplicationRecord
include Gitlab::Utils::StrongMemoize
include UsageStatistics
include ShaAttribute
include IgnorableColumns
ignore_columns :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
default_scope { reorder(nil) } # rubocop:disable Cop/DefaultScope
......
# frozen_string_literal: true
class EventsBigintConversionRemoveTriggers < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
TABLE_NAME = :events
TRIGGER_NAME = :trigger_69523443cc10
# 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, :id, :id_convert_to_bigint, trigger_name: TRIGGER_NAME)
end
end
# rubocop:enable Migration/WithLockRetriesDisallowedMethod
end
0d8caaa078914ed2bd43b383ee2efe50093947d65862c2f4dd8dc960cad0a43e
\ No newline at end of file
......@@ -98,15 +98,6 @@ BEGIN
END;
$$;
CREATE FUNCTION trigger_69523443cc10() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
NEW."id_convert_to_bigint" := NEW."id";
RETURN NEW;
END;
$$;
CREATE FUNCTION trigger_77f5e1d20482() RETURNS trigger
LANGUAGE plpgsql
AS $$
......@@ -27333,8 +27324,6 @@ CREATE TRIGGER trigger_51ab7cef8934 BEFORE INSERT OR UPDATE ON ci_builds_runner_
CREATE TRIGGER trigger_542d6c2ad72e BEFORE INSERT OR UPDATE ON ci_builds_metadata FOR EACH ROW EXECUTE FUNCTION trigger_542d6c2ad72e();
CREATE TRIGGER trigger_69523443cc10 BEFORE INSERT OR UPDATE ON events FOR EACH ROW EXECUTE FUNCTION trigger_69523443cc10();
CREATE TRIGGER trigger_77f5e1d20482 BEFORE INSERT OR UPDATE ON deployments FOR EACH ROW EXECUTE FUNCTION trigger_77f5e1d20482();
CREATE TRIGGER trigger_8485e97c00e3 BEFORE INSERT OR UPDATE ON ci_sources_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_8485e97c00e3();
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