Class: Doorkeeper::MigrationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/doorkeeper/migration_generator.rb

Overview

Copies main Doorkeeper migration into parent Rails application.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



22
23
24
# File 'lib/generators/doorkeeper/migration_generator.rb', line 22

def self.next_migration_number(dirname)
  ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#installObject



14
15
16
17
18
19
20
# File 'lib/generators/doorkeeper/migration_generator.rb', line 14

def install
  migration_template(
    "migration.rb.erb",
    "db/migrate/create_doorkeeper_tables.rb",
    migration_version: migration_version,
  )
end