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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-13 00:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-13 00:09:01 +0300
commiteef0c69d45082b370f1e41e50f12488a216944f2 (patch)
tree5c4a5c0e4db3fff89b9b4146b799e5de9dca57b9 /db/post_migrate
parent6d533fe8b44007d82b8de29a4b706da69e5f5936 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20210205213933_drop_alerts_service_data.rb26
-rw-r--r--db/post_migrate/20210205214003_remove_alerts_service_records_again.rb19
2 files changed, 45 insertions, 0 deletions
diff --git a/db/post_migrate/20210205213933_drop_alerts_service_data.rb b/db/post_migrate/20210205213933_drop_alerts_service_data.rb
new file mode 100644
index 00000000000..6ad6c90290e
--- /dev/null
+++ b/db/post_migrate/20210205213933_drop_alerts_service_data.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class DropAlertsServiceData < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ with_lock_retries do
+ drop_table :alerts_service_data
+ end
+ end
+
+ # rubocop:disable Migration/PreventStrings
+ def down
+ with_lock_retries do
+ create_table :alerts_service_data do |t|
+ t.bigint :service_id, null: false
+ t.timestamps_with_timezone
+ t.string :encrypted_token, limit: 255
+ t.string :encrypted_token_iv, limit: 255
+ end
+ end
+ end
+ # rubocop:enable Migration/PreventStrings
+end
diff --git a/db/post_migrate/20210205214003_remove_alerts_service_records_again.rb b/db/post_migrate/20210205214003_remove_alerts_service_records_again.rb
new file mode 100644
index 00000000000..aabc6fc00cd
--- /dev/null
+++ b/db/post_migrate/20210205214003_remove_alerts_service_records_again.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class RemoveAlertsServiceRecordsAgain < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ class Service < ActiveRecord::Base
+ self.table_name = 'services'
+ end
+
+ def up
+ Service.delete_by(type: 'AlertsService')
+ end
+
+ def down
+ # no-op
+ end
+end