diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 18:08:47 +0000 |
commit | 3832718d895bf8268f3e3aac85948e2792769345 (patch) | |
tree | 4a322399af568b6203e732ae2e2f3efc39b23a67 /db | |
parent | 180cd023a11c0eb413ad0de124d9758ea25672bd (diff) | |
download | gitlab-ce-3832718d895bf8268f3e3aac85948e2792769345.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20191127163053_add_confidential_to_doorkeeper_application.rb | 26 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20191127163053_add_confidential_to_doorkeeper_application.rb b/db/migrate/20191127163053_add_confidential_to_doorkeeper_application.rb new file mode 100644 index 00000000000..12e22b4744c --- /dev/null +++ b/db/migrate/20191127163053_add_confidential_to_doorkeeper_application.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class AddConfidentialToDoorkeeperApplication < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault + :oauth_applications, + :confidential, + :boolean, + default: false, # assume all existing applications are non-confidential + allow_null: false + ) + + # set the default to true so that all future applications are confidential by default + change_column_default(:oauth_applications, :confidential, true) + end + + def down + remove_column :oauth_applications, :confidential + end +end diff --git a/db/schema.rb b/db/schema.rb index c6c51481d1b..f6b44f9de00 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2853,6 +2853,7 @@ ActiveRecord::Schema.define(version: 2020_01_21_132641) do t.integer "owner_id" t.string "owner_type" t.boolean "trusted", default: false, null: false + t.boolean "confidential", default: true, null: false t.index ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type" t.index ["uid"], name: "index_oauth_applications_on_uid", unique: true end |