Skip to content

Commit

Permalink
Merge pull request #1152 from atomiyama/feature/migration_id_to_bigint
Browse files Browse the repository at this point in the history
[migration templates fix] migration generator template, resource_owner integer to references
  • Loading branch information
nbulaj committed Oct 4, 2018
2 parents ca43070 + aa138ef commit 0991dc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -12,6 +12,7 @@ User-visible changes worth mentioning.
triggers every time)
- [#1149] Fix for `URIChecker#valid_for_authorization?` false negative when query is blank, but `?` present.
- [#1151] Fix Refresh Token strategy: add proper validation of client credentials both for Public & Private clients.
- [#1152] Fixmigration template: change resource owner data type from integer to references

## 5.0.0

Expand Down
4 changes: 2 additions & 2 deletions lib/generators/doorkeeper/templates/migration.rb.erb
Expand Up @@ -13,7 +13,7 @@ class CreateDoorkeeperTables < ActiveRecord::Migration<%= migration_version %>
add_index :oauth_applications, :uid, unique: true

create_table :oauth_access_grants do |t|
t.integer :resource_owner_id, null: false
t.references :resource_owner, null: false
t.references :application, null: false
t.string :token, null: false
t.integer :expires_in, null: false
Expand All @@ -31,7 +31,7 @@ class CreateDoorkeeperTables < ActiveRecord::Migration<%= migration_version %>
)

create_table :oauth_access_tokens do |t|
t.integer :resource_owner_id
t.references :resource_owner
t.references :application

# If you use a custom token generator you may need to change this column
Expand Down

0 comments on commit 0991dc2

Please sign in to comment.