Sha256: c14b59a1f3185d7d275702b575e0ff1db324791abdf55571672b498c05cfa027
Contents?: true
Size: 883 Bytes
Versions: 14
Compression:
Stored size: 883 Bytes
Contents
class DeviseOauth2UpgradeToVersion2 < ActiveRecord::Migration def change change_table :oauth2_clients do |t| t.text :default_permissions t.belongs_to :owner, polymorphic: true t.index :owner_id end change_table :oauth2_access_tokens do |t| t.text :permissions t.rename :user_id, :owner_id t.string :owner_type end change_table :oauth2_refresh_tokens do |t| t.rename :user_id, :owner_id t.string :owner_type end change_table :oauth2_authorization_codes do |t| t.rename :user_id, :owner_id t.string :owner_type end Devise::Oauth2::AuthorizationCode.update_all("owner_type = 'User'") Devise::Oauth2::Client.update_all("owner_type = 'User'") Devise::Oauth2::AccessToken.update_all("owner_type = 'User'") Devise::Oauth2::RefreshToken.update_all("owner_type = 'User'") end end
Version data entries
14 entries across 14 versions & 1 rubygems