class Glueby::Contract::BlockSyncerGenerator

Public Instance Methods

create_migration_file() click to toggle source
# File lib/generators/glueby/contract/block_syncer_generator.rb, line 10
def create_migration_file
  migration_dir = File.expand_path("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: table_options,
    )
  end
end