diff options
author | Krasimir Angelov <kangelov@gitlab.com> | 2019-06-06 12:37:49 +0300 |
---|---|---|
committer | Krasimir Angelov <kangelov@gitlab.com> | 2019-06-18 02:09:15 +0300 |
commit | 03000c8f26e85f5bc8bbfe292af7ffd1bcc38d29 (patch) | |
tree | 066683f2351ad7bc56fe02fbdd2765f4be252326 /db/schema.rb | |
parent | 30bddd546f117043f2b7389ad06ba5257184c148 (diff) |
Add migrations needed to encrypt feature flags client tokens
Make plaintext token column not null, add new token_encrypted column and
index on project_id & token_encrypted.
Post deployment migration to encrypt existing tokens.
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb index c6186c52699..6903b061ee5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2257,8 +2257,10 @@ ActiveRecord::Schema.define(version: 20190613030606) do create_table "operations_feature_flags_clients", force: :cascade do |t| t.integer "project_id", null: false - t.string "token", null: false + t.string "token" + t.string "token_encrypted" t.index ["project_id", "token"], name: "index_operations_feature_flags_clients_on_project_id_and_token", unique: true, using: :btree + t.index ["project_id", "token_encrypted"], name: "index_feature_flags_clients_on_project_id_and_token_encrypted", unique: true, using: :btree end create_table "packages_maven_metadata", force: :cascade do |t| |