mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Add support for multiple keypairs for remote accounts (#38279)
This commit is contained in:
20
db/migrate/20260323105645_create_keypairs.rb
Normal file
20
db/migrate/20260323105645_create_keypairs.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateKeypairs < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :keypairs do |t|
|
||||
t.references :account, null: false, foreign_key: { on_delete: :cascade }
|
||||
|
||||
t.string :uri, null: false
|
||||
t.integer :type, null: false
|
||||
t.string :public_key, null: false
|
||||
t.string :private_key
|
||||
t.datetime :expires_at
|
||||
t.boolean :revoked, default: false, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :keypairs, :uri, unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user