Class: Glueby::Contract::BlockSyncerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Glueby::Contract::BlockSyncerGenerator
- Extended by:
- Generator::MigrateGenerator::ClassMethod
- Includes:
- Generator::MigrateGenerator, Rails::Generators::Migration
- Defined in:
- lib/generators/glueby/contract/block_syncer_generator.rb
Constant Summary
Constants included from Generator::MigrateGenerator
Generator::MigrateGenerator::MYSQL_ADAPTERS
Instance Method Summary collapse
Methods included from Generator::MigrateGenerator::ClassMethod
Methods included from Generator::MigrateGenerator
#migration_version, #mysql?, #table_options
Instance Method Details
#create_migration_file ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/generators/glueby/contract/block_syncer_generator.rb', line 10 def create_migration_file migration_dir = File.("db/migrate") if self.class.migration_exists?(migration_dir, "create_system_information") ::Kernel.warn "Migration already exists: create_system_information" else migration_template( "system_information_table.rb.erb", "db/migrate/create_system_information.rb", migration_version: migration_version, table_options: , ) end end |