Sha256: f980c93e099b9d10bdc1e42a0c6d31dc9178a9630124efde090990946d790e3a

Contents?: true

Size: 550 Bytes

Versions: 2

Compression:

Stored size: 550 Bytes

Contents

require 'rails/generators/migration'

module OauthService
  module Generators
    class MigrationsGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path("../../templates/migrations", __FILE__)

      desc "Create table migration in your db/migrate folder."

      def create_migrations
        migration_template "create_tables.rb", "db/migrate/create_tables.rb"
      end

      def self.next_migration_number(path)
        Time.now.utc.strftime("%Y%m%d%H%M%S")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
oauth_service-0.0.2 lib/generators/oauth_service/migrations_generator.rb
oauth_service-0.0.1 lib/generators/oauth_service/migrations_generator.rb