diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-10 06:07:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-10 06:07:43 +0300 |
commit | 677227413ae31f5a02fd4c8e10f6ef50c228334f (patch) | |
tree | fbd07453cf1aaded55f081bb42fa043b3f3ffc2b /db | |
parent | 3f22924df411018ba665ecf72ab0768d61173477 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb | 23 | ||||
-rw-r--r-- | db/schema_migrations/20230201082038 | 1 | ||||
-rw-r--r-- | db/structure.sql | 4 |
3 files changed, 25 insertions, 3 deletions
diff --git a/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb b/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb new file mode 100644 index 00000000000..7f90b3293d8 --- /dev/null +++ b/db/post_migrate/20230201082038_drop_web_hook_calls_high_column.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DropWebHookCallsHighColumn < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + with_lock_retries do + if column_exists?(:plan_limits, :web_hook_calls_high) # rubocop:disable Style/IfUnlessModifier + remove_column :plan_limits, :web_hook_calls_high + end + end + end + + def down + with_lock_retries do + unless column_exists?(:plan_limits, :web_hook_calls_high) + # rubocop:disable Migration/SchemaAdditionMethodsNoPost + add_column :plan_limits, :web_hook_calls_high, :integer, default: 0 + # rubocop:enable Migration/SchemaAdditionMethodsNoPost + end + end + end +end diff --git a/db/schema_migrations/20230201082038 b/db/schema_migrations/20230201082038 new file mode 100644 index 00000000000..b7e1ee666db --- /dev/null +++ b/db/schema_migrations/20230201082038 @@ -0,0 +1 @@ +0b735c9ccd267734fd4c4f6f15f6dfac67ec212786e4c31d75b73e2fae537617
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 067e8646819..0c9612dc425 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -19745,9 +19745,7 @@ CREATE TABLE plan_limits ( enforcement_limit integer DEFAULT 0 NOT NULL, notification_limit integer DEFAULT 0 NOT NULL, dashboard_limit_enabled_at timestamp with time zone, - web_hook_calls_high integer DEFAULT 0, - web_hook_calls integer DEFAULT 0 NOT NULL, - CONSTRAINT check_0fa68f370e CHECK ((web_hook_calls_high IS NOT NULL)) + web_hook_calls integer DEFAULT 0 NOT NULL ); CREATE SEQUENCE plan_limits_id_seq |