First crack
This commit is contained in:
18
db/migrate/20251023054038_create_oidc_authorization_codes.rb
Normal file
18
db/migrate/20251023054038_create_oidc_authorization_codes.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class CreateOidcAuthorizationCodes < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
create_table :oidc_authorization_codes do |t|
|
||||
t.string :code, null: false
|
||||
t.references :application, null: false, foreign_key: true
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.string :redirect_uri, null: false
|
||||
t.string :scope
|
||||
t.datetime :expires_at, null: false
|
||||
t.boolean :used, default: false, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :oidc_authorization_codes, :code, unique: true
|
||||
add_index :oidc_authorization_codes, :expires_at
|
||||
add_index :oidc_authorization_codes, [ :application_id, :user_id ]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user