Class: Sequel::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Sequel::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/sequel/generators/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(_dirname) ⇒ Object
12 13 14 |
# File 'lib/sequel/generators/migration_generator.rb', line 12 def self.next_migration_number _dirname Time.now.strftime "%Y%m%d%H%M%S" end |
Instance Method Details
#create_migration_file ⇒ Object
16 17 18 19 20 |
# File 'lib/sequel/generators/migration_generator.rb', line 16 def create_migration_file migration_template "migration.rb.erb", "db/migrate/#{file_name}.rb" migration_template "up.sql.erb", "db/migrate/#{file_name}_up.sql" migration_template "down.sql.erb", "db/migrate/#{file_name}_down.sql" end |