diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-07-24 17:45:12 -0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-07-27 12:09:46 -0400 |
commit | e561b142fa7c9dd636fd056fc0a6c84961d0cd46 (patch) | |
tree | 10e34698af1d5a3647840faee470e6047b782e30 /db | |
parent | 9981814514742a2ee507d4dcc2fd71099fd96585 (diff) | |
download | gitlab-ce-e561b142fa7c9dd636fd056fc0a6c84961d0cd46.tar.gz |
Backport gitlab-ee!2456
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb new file mode 100644 index 00000000000..1a013e6aefb --- /dev/null +++ b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb @@ -0,0 +1,15 @@ +class AddTrustedColumnToOauthApplications < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:oauth_applications, :trusted, :boolean, default: false) + end + + def down + remove_column(:oauth_applications, :trusted) + end +end diff --git a/db/schema.rb b/db/schema.rb index 1ec25c7d46f..0f14f8ac0ba 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -997,6 +997,7 @@ ActiveRecord::Schema.define(version: 20170725145659) do t.datetime "updated_at" t.integer "owner_id" t.string "owner_type" + t.boolean "trusted", default: false, null: false end add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree |