Class: Dynomite::Migration

Inherits:
Object
  • Object
show all
Defined in:
lib/dynomite/migration.rb,
lib/dynomite/migration/dsl.rb,
lib/dynomite/migration/executor.rb,
lib/dynomite/migration/generator.rb

Defined Under Namespace

Classes: Dsl, Executor, Generator

Instance Method Summary collapse

Instance Method Details

#create_table(table_name, &block) ⇒ Object



11
12
13
# File 'lib/dynomite/migration.rb', line 11

def create_table(table_name, &block)
  execute_with_dsl_params(table_name, :create_table, &block)
end

#upObject



7
8
9
# File 'lib/dynomite/migration.rb', line 7

def up
  puts "Should defined an up method for your migration: #{self.class.name}"
end

#update_table(table_name, &block) ⇒ Object



15
16
17
# File 'lib/dynomite/migration.rb', line 15

def update_table(table_name, &block)
  execute_with_dsl_params(table_name, :update_table, &block)
end