Commit 36848426 authored by Stan Hu's avatar Stan Hu

Merge branch '332592-readd-state-for-members' into 'master'

Re-addition of the state column for members table

See merge request gitlab-org/gitlab!69220
parents 78bfaec7 3c8ef22d
# frozen_string_literal: true
class AddStateToMember < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def up
unless column_exists?(:members, :state)
with_lock_retries do
add_column :members, :state, :integer, limit: 2, default: 0
end
end
end
def down
if column_exists?(:members, :state)
with_lock_retries do
remove_column :members, :state
end
end
end
end
54f7c66eed745b62d0b53a407a96721f90392ab7f800db9c8a2607f22974ef3c
\ No newline at end of file
......@@ -14873,7 +14873,8 @@ CREATE TABLE members (
requested_at timestamp without time zone,
expires_at date,
ldap boolean DEFAULT false NOT NULL,
override boolean DEFAULT false NOT NULL
override boolean DEFAULT false NOT NULL,
state smallint DEFAULT 0
);
CREATE SEQUENCE members_id_seq
......@@ -333,6 +333,9 @@ excluded_attributes:
project_members:
- :source_id
- :invite_email_success
- :state
group_members:
- :state
metrics:
- :merge_request_id
- :pipeline_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment