Sha256: caf2fd5b416b3d66d5fff7a76e41c1dcd1040fcb90cb6e7f62706ca0ad97c7e4

Contents?: true

Size: 658 Bytes

Versions: 25

Compression:

Stored size: 658 Bytes

Contents

# frozen_string_literal: true

class EnablePolymorphicResourceOwner < ActiveRecord::Migration<%= migration_version %>
  def change
    add_column :oauth_access_tokens, :resource_owner_type, :string
    add_column :oauth_access_grants, :resource_owner_type, :string
    change_column_null :oauth_access_grants, :resource_owner_type, false

    add_index :oauth_access_tokens,
              [:resource_owner_id, :resource_owner_type],
              name: 'polymorphic_owner_oauth_access_tokens'

    add_index :oauth_access_grants,
              [:resource_owner_id, :resource_owner_type],
              name: 'polymorphic_owner_oauth_access_grants'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
doorkeeper-5.8.0 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.7.1 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.7.0 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.9 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.8 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.7 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.6 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.5 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.4 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.3 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.2 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.1 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.0 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.0.rc2 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.6.0.rc1 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.5.4 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.5.3 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.5.2 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.5.1 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb
doorkeeper-5.5.0 lib/generators/doorkeeper/templates/enable_polymorphic_resource_owner_migration.rb.erb