about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-03-02 18:02:48 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-03-02 18:02:48 +0100
commit425a6c90c44a620e5015cd659cf5d8e3bf68ee07 (patch)
tree1bb889bca498b07dd4f3a56a5690ea9c2f602382 /db
parent0b8fe020b599341d78cc03431eb156485c70ebea (diff)
parent462a6f7d721fa0717c5627fd0f0d73ee9ec5a675 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb
new file mode 100644
index 000000000..6b46e60a8
--- /dev/null
+++ b/db/migrate/20220227041951_add_last_used_at_to_oauth_access_tokens.rb
@@ -0,0 +1,6 @@
+class AddLastUsedAtToOauthAccessTokens < ActiveRecord::Migration[6.1]
+  def change
+    add_column :oauth_access_tokens, :last_used_at, :datetime
+    add_column :oauth_access_tokens, :last_used_ip, :inet
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index faab9b22b..36960e84a 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 2022_02_24_010024) do
+ActiveRecord::Schema.define(version: 2022_02_27_041951) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -630,6 +630,8 @@ ActiveRecord::Schema.define(version: 2022_02_24_010024) do
     t.string "scopes"
     t.bigint "application_id"
     t.bigint "resource_owner_id"
+    t.datetime "last_used_at"
+    t.inet "last_used_ip"
     t.index ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true
     t.index ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id"
     t.index ["token"], name: "index_oauth_access_tokens_on_token", unique: true