diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index f56d15098e3198c07f208b7d1cf0a4fe4634e5f5..57fa0651ebe0f30f5ff28e8c8f492914a1e9f0c4 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -19,7 +19,7 @@ class Pipeline < Ci::ApplicationRecord include FastDestroyAll::Helpers include IgnorableColumns - ignore_column :id_convert_to_bigint, remove_with: '16.3', remove_after: '2023-08-22' + ignore_column :id_convert_to_bigint, remove_with: '17.2', remove_after: '2024-06-15' MAX_OPEN_MERGE_REQUESTS_REFS = 4 diff --git a/db/post_migrate/20240513042657_cleanup_bigint_conversions_for_ci_pipelines.rb b/db/post_migrate/20240513042657_cleanup_bigint_conversions_for_ci_pipelines.rb new file mode 100644 index 0000000000000000000000000000000000000000..3ae9efa83ec98f6d4c583130c49b9054becec446 --- /dev/null +++ b/db/post_migrate/20240513042657_cleanup_bigint_conversions_for_ci_pipelines.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class CleanupBigintConversionsForCiPipelines < Gitlab::Database::Migration[2.2] + milestone '17.1' + enable_lock_retries! + + TABLE = :ci_pipelines + COLUMNS = %i[id] + + def up + cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS) + end + + def down + restore_conversion_of_integer_to_bigint(TABLE, COLUMNS) + end +end diff --git a/db/schema_migrations/20240513042657 b/db/schema_migrations/20240513042657 new file mode 100644 index 0000000000000000000000000000000000000000..50f395220f98d0e5c0abb4768a3bb59df4788606 --- /dev/null +++ b/db/schema_migrations/20240513042657 @@ -0,0 +1 @@ +3b6c9657b2bd7ec2a772339716fa1c293c4352a709fdc71043d2265ade855d2a \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 3141a6ff832dbf06b8313a449732c512aba79d49..2a7484fefc6727e2b2322defc6ddf7d9fade8cba 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -852,15 +852,6 @@ RETURN NEW; END $$; -CREATE FUNCTION trigger_b2d852e1e2cb() RETURNS trigger - LANGUAGE plpgsql - AS $$ -BEGIN - NEW."id_convert_to_bigint" := NEW."id"; - RETURN NEW; -END; -$$; - CREATE FUNCTION trigger_b4520c29ea74() RETURNS trigger LANGUAGE plpgsql AS $$ @@ -6845,7 +6836,6 @@ CREATE SEQUENCE ci_pipeline_variables_id_seq ALTER SEQUENCE ci_pipeline_variables_id_seq OWNED BY p_ci_pipeline_variables.id; CREATE TABLE ci_pipelines ( - id_convert_to_bigint integer DEFAULT 0 NOT NULL, ref character varying, sha character varying, before_sha character varying, @@ -29925,8 +29915,6 @@ CREATE TRIGGER trigger_56d49f4ed623 BEFORE INSERT OR UPDATE ON workspace_variabl CREATE TRIGGER trigger_94514aeadc50 BEFORE INSERT OR UPDATE ON deployment_approvals FOR EACH ROW EXECUTE FUNCTION trigger_94514aeadc50(); -CREATE TRIGGER trigger_b2d852e1e2cb BEFORE INSERT OR UPDATE ON ci_pipelines FOR EACH ROW EXECUTE FUNCTION trigger_b2d852e1e2cb(); - CREATE TRIGGER trigger_b4520c29ea74 BEFORE INSERT OR UPDATE ON approval_merge_request_rule_sources FOR EACH ROW EXECUTE FUNCTION trigger_b4520c29ea74(); CREATE TRIGGER trigger_catalog_resource_sync_event_on_project_update AFTER UPDATE ON projects FOR EACH ROW WHEN ((((old.name)::text IS DISTINCT FROM (new.name)::text) OR (old.description IS DISTINCT FROM new.description) OR (old.visibility_level IS DISTINCT FROM new.visibility_level))) EXECUTE FUNCTION insert_catalog_resource_sync_event();