Class: Sequel::Generators::MigrationGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/sequel/migration/migration_generator.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

base_name, source_root

Instance Attribute Details

#column_actionObject (readonly)

Returns the value of attribute column_action.



21
22
23
# File 'lib/generators/sequel/migration/migration_generator.rb', line 21

def column_action
  @column_action
end

#migration_actionObject (readonly)

Returns the value of attribute migration_action.



21
22
23
# File 'lib/generators/sequel/migration/migration_generator.rb', line 21

def migration_action
  @migration_action
end

#table_actionObject (readonly)

Returns the value of attribute table_action.



21
22
23
# File 'lib/generators/sequel/migration/migration_generator.rb', line 21

def table_action
  @table_action
end

#use_changeObject (readonly)

Returns the value of attribute use_change.



21
22
23
# File 'lib/generators/sequel/migration/migration_generator.rb', line 21

def use_change
  @use_change
end

Instance Method Details

#create_migration_fileObject



15
16
17
18
19
# File 'lib/generators/sequel/migration/migration_generator.rb', line 15

def create_migration_file
  set_local_assigns!
  validate_file_name!
  migration_template "migration.rb.erb", "db/migrate/#{file_name}.rb"
end