Sha256: 6eb1e106356455d313c2591181c25b6d25f9a10467d125e2c6d0d7512c356ccc
Contents?: true
Size: 808 Bytes
Versions: 8
Compression:
Stored size: 808 Bytes
Contents
# frozen_string_literal: true require 'rails/generators' require 'rails/generators/active_record' module Doorkeeper class MigrationGenerator < ::Rails::Generators::Base include ::Rails::Generators::Migration source_root File.expand_path('templates', __dir__) desc 'Installs Doorkeeper migration file.' def install migration_template( 'migration.rb.erb', 'db/migrate/create_doorkeeper_tables.rb', migration_version: migration_version ) end def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end private def migration_version if ActiveRecord::VERSION::MAJOR >= 5 "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems