resource_owner_id
without knowing model name of the Resource Owner.:resource_owner_id
column - you need to drop it as now it would be a polymorphic association. You can drop FK in the migration generated above.doorkeeper_token.resource_owner
association.resource_owner
instance instead of it's ID (like it was before).