summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-01-09 10:30:49 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-01-09 10:30:49 +0000
commitcb4964d23b49f775ad3c8aa562942911b6b1c262 (patch)
treecb8af8e74102d709c40e1119b000e0f8ae1419b9 /db
parentfb5ded7d8ef32177e51af047e4dafbc3ed9c6abb (diff)
parentb6df93a51f90c7ed29ce6667c6b1a8debf02506e (diff)
downloadgitlab-ce-cb4964d23b49f775ad3c8aa562942911b6b1c262.tar.gz
Merge branch 'track_last_used_date_of_ssh_keys' into 'master'
Record and show last used date of SSH Keys See merge request !8113
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161221152132_add_last_used_at_to_key.rb9
-rw-r--r--db/schema.rb1
2 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20161221152132_add_last_used_at_to_key.rb b/db/migrate/20161221152132_add_last_used_at_to_key.rb
new file mode 100644
index 00000000000..fb2b15817de
--- /dev/null
+++ b/db/migrate/20161221152132_add_last_used_at_to_key.rb
@@ -0,0 +1,9 @@
+class AddLastUsedAtToKey < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :keys, :last_used_at, :datetime
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 923ece86edb..9bce3b82d82 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -528,6 +528,7 @@ ActiveRecord::Schema.define(version: 20161227192806) do
t.string "fingerprint"
t.boolean "public", default: false, null: false
t.boolean "can_push", default: false, null: false
+ t.datetime "last_used_at"
end
add_index "keys", ["fingerprint"], name: "index_keys_on_fingerprint", unique: true, using: :btree