diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-27 09:09:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-27 09:09:51 +0300 |
commit | a59d305223365cb31bb670f134383d6ff316a13e (patch) | |
tree | f3be1afa29fca783ec0e94eaba41a4884d146ef8 /db | |
parent | 19ae126005d36803c1d273334c3eac91881c071c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200424050250_remove_orphaned_invited_members.rb | 13 | ||||
-rw-r--r-- | db/structure.sql | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20200424050250_remove_orphaned_invited_members.rb b/db/migrate/20200424050250_remove_orphaned_invited_members.rb new file mode 100644 index 00000000000..0fb2f7d9c39 --- /dev/null +++ b/db/migrate/20200424050250_remove_orphaned_invited_members.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RemoveOrphanedInvitedMembers < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + # As of 2020-04-23, there are 19 entries on GitLab.com that match this criteria. + execute "DELETE FROM members WHERE user_id IS NULL AND invite_token IS NULL AND invite_accepted_at IS NOT NULL" + end + + def down + end +end diff --git a/db/structure.sql b/db/structure.sql index 778a34adbee..c61f775da5e 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -13462,5 +13462,6 @@ COPY "schema_migrations" (version) FROM STDIN; 20200423080334 20200423080607 20200423081409 +20200424050250 \. |