Skip to content

"Extend PAT expiration setting to GitLab.com" - Add necessary database column

Manoj M J requested to merge 11889-gma-pat-expiry-db-changes into master

What does this MR do?

This change adds the db column in the namespaces, necessary for building #118893 (closed)

Follow up MR: !27055 (merged)

The follow up MR was turning lengthy due to all the changes, hence I have made a MR separately just for the migration.

Changes:

  • Add database column in namespaces table for PAT expiry

Ouput:

Up migration

▶ VERBOSE=true rake db:migrate
== 20200323075043 AddMaxPersonalAccessTokenLifetimeToNamespaces: migrating ====
-- add_column(:namespaces, :max_personal_access_token_lifetime, :integer)
   -> 0.0017s
== 20200323075043 AddMaxPersonalAccessTokenLifetimeToNamespaces: migrated (0.0083s)

Down migration

▶ VERBOSE=true rake db:migrate:down VERSION=20200323075043
== 20200323075043 AddMaxPersonalAccessTokenLifetimeToNamespaces: reverting ====
-- remove_column(:namespaces, :max_personal_access_token_lifetime)
   -> 0.0019s
== 20200323075043 AddMaxPersonalAccessTokenLifetimeToNamespaces: reverted (0.0085s)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Manoj M J

Merge request reports