Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb')
-rw-r--r--db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb b/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb
deleted file mode 100644
index 7a0923aabd8..00000000000
--- a/db/post_migrate/20190625184066_remove_sentry_from_application_settings.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class RemoveSentryFromApplicationSettings < ActiveRecord::Migration[5.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- SENTRY_ENABLED_COLUMNS = [
- :sentry_enabled,
- :clientside_sentry_enabled
- ].freeze
-
- SENTRY_DSN_COLUMNS = [
- :sentry_dsn,
- :clientside_sentry_dsn
- ].freeze
-
- disable_ddl_transaction!
-
- def up
- (SENTRY_ENABLED_COLUMNS + SENTRY_DSN_COLUMNS).each do |column|
- remove_column(:application_settings, column) if column_exists?(:application_settings, column)
- end
- end
-
- def down
- SENTRY_ENABLED_COLUMNS.each do |column|
- # rubocop:disable Migration/AddColumnWithDefault
- add_column_with_default(:application_settings, column, :boolean, default: false, allow_null: false) unless column_exists?(:application_settings, column)
- # rubocop:enable Migration/AddColumnWithDefault
- end
-
- SENTRY_DSN_COLUMNS.each do |column|
- add_column(:application_settings, column, :string) unless column_exists?(:application_settings, column)
- end
- end
-end