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>2020-03-20 00:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 00:09:17 +0300
commit49a923c646a2c24b5377cfde8236c73094c60d42 (patch)
tree8e4ef094e6a338c80123765d8cd2a707c82bdc7b /db/migrate/20200313101649_fill_ghost_user_type.rb
parent0eb4fd2f32e6804bc85868ba167170238e346279 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200313101649_fill_ghost_user_type.rb')
-rw-r--r--db/migrate/20200313101649_fill_ghost_user_type.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20200313101649_fill_ghost_user_type.rb b/db/migrate/20200313101649_fill_ghost_user_type.rb
new file mode 100644
index 00000000000..fa0c02e5413
--- /dev/null
+++ b/db/migrate/20200313101649_fill_ghost_user_type.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class FillGhostUserType < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def up
+ execute('UPDATE users SET user_type = 5 WHERE ghost IS TRUE AND user_type IS NULL')
+ end
+
+ def down
+ execute('UPDATE users SET user_type = NULL WHERE ghost IS TRUE AND user_type IS NOT NULL')
+ end
+end