Skip to content
代码片段 群组 项目
未验证 提交 1ecaa5b1 编辑于 作者: Adam Hegyi's avatar Adam Hegyi 提交者: GitLab
浏览文件

Merge branch 'fvpotvin-db-mvc-advanced-scoped-tokens' into 'master'

Add database migration in preparation to add advanced scope tokens

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/153482



Merged-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Approved-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Co-authored-by: default avatarunset <fveillette@gitlab.com>
No related branches found
No related tags found
无相关合并请求
# frozen_string_literal: true
class AddAdvancedTokenScope < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '17.1'
def up
with_lock_retries do
add_column :personal_access_tokens, :advanced_scopes, :text, if_not_exists: true
end
add_text_limit :personal_access_tokens, :advanced_scopes, 4096
end
def down
with_lock_retries do
remove_column :personal_access_tokens, :advanced_scopes, if_exists: true
end
end
end
520aba73d923a667f37068c1d39cb0f8cc2b5b84c4653ebf50248961e65d6566
\ No newline at end of file
...@@ -13690,7 +13690,9 @@ CREATE TABLE personal_access_tokens ( ...@@ -13690,7 +13690,9 @@ CREATE TABLE personal_access_tokens (
expire_notification_delivered boolean DEFAULT false NOT NULL, expire_notification_delivered boolean DEFAULT false NOT NULL,
last_used_at timestamp with time zone, last_used_at timestamp with time zone,
after_expiry_notification_delivered boolean DEFAULT false NOT NULL, after_expiry_notification_delivered boolean DEFAULT false NOT NULL,
previous_personal_access_token_id bigint previous_personal_access_token_id bigint,
advanced_scopes text,
CONSTRAINT check_aa95773861 CHECK ((char_length(advanced_scopes) <= 4096))
); );
   
CREATE SEQUENCE personal_access_tokens_id_seq CREATE SEQUENCE personal_access_tokens_id_seq
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册