Class: Doorkeeper::RemoveApplicationSecretNotNullConstraint

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

Overview

Generates migration with which drops NOT NULL constraint and allows not to bloat the database with redundant secret value.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



23
24
25
# File 'lib/generators/doorkeeper/remove_applications_secret_not_null_constraint_generator.rb', line 23

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

Instance Method Details

#enable_polymorphic_resource_ownerObject



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

def enable_polymorphic_resource_owner
  migration_template(
    "remove_applications_secret_not_null_constraint.rb.erb",
    "db/migrate/remove_applications_secret_not_null_constraint.rb",
    migration_version: migration_version,
  )
end