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, next_migration_number, source_root

Instance Attribute Details

#column_actionObject (readonly)

Returns the value of attribute column_action.



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

def column_action
  @column_action
end

#migration_actionObject (readonly)

Returns the value of attribute migration_action.



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

def migration_action
  @migration_action
end

#table_actionObject (readonly)

Returns the value of attribute table_action.



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

def table_action
  @table_action
end

#use_changeObject (readonly)

Returns the value of attribute use_change.



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

def use_change
  @use_change
end

Instance Method Details

#create_migration_fileObject



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

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