diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0000 |
commit | 49a923c646a2c24b5377cfde8236c73094c60d42 (patch) | |
tree | 8e4ef094e6a338c80123765d8cd2a707c82bdc7b /db | |
parent | 0eb4fd2f32e6804bc85868ba167170238e346279 (diff) | |
download | gitlab-ce-49a923c646a2c24b5377cfde8236c73094c60d42.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200313101649_fill_ghost_user_type.rb | 13 |
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 |