main
1# frozen_string_literal: true
2
3class CreateAuthorizations < ActiveRecord::Migration[5.2]
4 def change
5 create_table :authorizations, id: :uuid do |t|
6 t.references :user, foreign_key: true, type: :uuid
7 t.references :client, foreign_key: true, type: :uuid
8 t.string :code, null: false, index: true
9 t.string :challenge
10 t.integer :challenge_method, default: 0
11 t.datetime :expired_at, null: false
12 t.datetime :revoked_at
13
14 t.timestamps
15 end
16 end
17end