Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix migration file for rails 5 #985

Closed
wants to merge 15 commits into from
5 changes: 3 additions & 2 deletions lib/generators/doorkeeper/application_owner_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ class Doorkeeper::ApplicationOwnerGenerator < Rails::Generators::Base

def application_owner
migration_template(
'add_owner_to_application_migration.rb',
'db/migrate/add_owner_to_application.rb'
'add_owner_to_application_migration.rb.erb',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

'db/migrate/add_owner_to_application.rb',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

migration_version: migration_version
)
end

Expand Down
4 changes: 2 additions & 2 deletions lib/generators/doorkeeper/migration_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class Doorkeeper::MigrationGenerator < ::Rails::Generators::Base

def install
migration_template(
'migration.rb',
'db/migrate/create_doorkeeper_tables.rb',
"migration.rb.erb",
"db/migrate/create_doorkeeper_tables.rb",
migration_version: migration_version
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddOwnerToApplication < ActiveRecord::Migration
class AddOwnerToApplication < ActiveRecord::Migration<%= migration_version %>
def change
add_column :oauth_applications, :owner_id, :integer, null: true
add_column :oauth_applications, :owner_type, :string, null: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPreviousRefreshTokenToAccessTokens < ActiveRecord::Migration
class AddPreviousRefreshTokenToAccessTokens < ActiveRecord::Migration<%= migration_version %>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unterminated string meets end of file

def change
add_column(
:oauth_access_tokens,
Expand Down