diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-18 18:37:56 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-18 18:37:56 +0000 |
commit | 6f3fe923d70b78a7585d2c7c6db4e2ffa3167d75 (patch) | |
tree | c8a1d383ad8761bde66a9c54f0391aff89a0fb5d /db | |
parent | ba0c6e4dd8178d69f3e2878205f24b62120acc55 (diff) | |
parent | dbedf3a61b5fe233b87b217596dea5572fc741b3 (diff) | |
download | gitlab-ce-6f3fe923d70b78a7585d2c7c6db4e2ffa3167d75.tar.gz |
Merge branch '17334-u2f-device-identifiers' into 'master'
Allow naming (and deleting) U2F devices.
## What does this MR do?
- Allow giving each U2F device a name (at the time of registration).
- Allow deleting individual U2F devices.
- Display a list of registered U2F devices.
## What are the relevant issue numbers?
- Closes #17334
- Closes #17335
See merge request !5833
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb | 29 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb new file mode 100644 index 00000000000..7152bd04331 --- /dev/null +++ b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb @@ -0,0 +1,29 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddColumnNameToU2fRegistrations < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :u2f_registrations, :name, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 0cdcc080227..fa56db332b3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160810142633) do +ActiveRecord::Schema.define(version: 20160816161312) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -1016,6 +1016,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "name" end add_index "u2f_registrations", ["key_handle"], name: "index_u2f_registrations_on_key_handle", using: :btree |