OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/db/migrate/20220518154147_create_oauth...

18 lines
653 B

class CreateOAuthClientTokens < ActiveRecord::Migration[6.1]
def change
create_table :oauth_client_tokens do |t|
t.references :oauth_client, null: false, foreign_key: { to_table: :oauth_clients, on_delete: :cascade }
t.references :user, null: false, index: true, foreign_key: { to_table: :users, on_delete: :cascade }
t.string :access_token
t.string :refresh_token
t.string :token_type
t.integer :expires_in
t.string :scope
t.string :origin_user_id # ID of the current user on the _OAuth2_provider_side_
t.timestamps
t.index %i[user_id oauth_client_id], unique: true
end
end
end