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>2019-12-10 18:07:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 18:07:52 +0300
commit27d91a629918e417a9e87825e838209b9ace79c1 (patch)
treee066c3fc84e3011641e662252810cb2c240edb90 /db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb
parent5e11c9b77cb1b2b77ee29359047b55807afe255d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb')
-rw-r--r--db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb b/db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb
new file mode 100644
index 00000000000..84d17f558d1
--- /dev/null
+++ b/db/migrate/20191129134844_add_broadcast_type_to_broadcast_message.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddBroadcastTypeToBroadcastMessage < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ # Set this constant to true if this migration requires downtime.
+ DOWNTIME = false
+ BROADCAST_MESSAGE_BANNER_TYPE = 1
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:broadcast_messages, :broadcast_type, :smallint, default: BROADCAST_MESSAGE_BANNER_TYPE)
+ end
+
+ def down
+ remove_column(:broadcast_messages, :broadcast_type)
+ end
+end