main
1# frozen_string_literal: true
2
3class CreateTokens < ActiveRecord::Migration[5.2]
4 def change
5 create_table :tokens, id: :uuid do |t|
6 t.references :authorization
7 t.references :subject, polymorphic: true, type: :uuid
8 t.references :audience, polymorphic: true, type: :uuid
9 t.integer :token_type, default: 0
10 t.datetime :expired_at
11 t.datetime :revoked_at
12
13 t.timestamps
14 end
15 end
16end