Module: Lhm
- Defined in:
- lib/lhm.rb,
lib/lhm/table.rb,
lib/lhm/chunker.rb,
lib/lhm/command.rb,
lib/lhm/invoker.rb,
lib/lhm/version.rb,
lib/lhm/migrator.rb,
lib/lhm/entangler.rb,
lib/lhm/migration.rb,
lib/lhm/sql_helper.rb,
lib/lhm/intersection.rb,
lib/lhm/atomic_switcher.rb,
lib/lhm/locked_switcher.rb
Overview
Copyright © 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias Schmidt
Defined Under Namespace
Modules: Command, SqlHelper Classes: AtomicSwitcher, Chunker, Entangler, Error, Intersection, Invoker, LockedSwitcher, Migration, Migrator, Table
Constant Summary collapse
- VERSION =
"1.1.0"
Class Method Summary collapse
-
.change_table(table_name, options = {}) {|Migrator| ... } ⇒ Boolean
Alters a table with the changes described in the block.
Class Method Details
.change_table(table_name, options = {}) {|Migrator| ... } ⇒ Boolean
Alters a table with the changes described in the block
36 37 38 39 40 41 42 43 44 |
# File 'lib/lhm.rb', line 36 def self.change_table(table_name, = {}, &block) connection = ActiveRecord::Base.connection origin = Table.parse(table_name, connection) invoker = Invoker.new(origin, connection) block.call(invoker.migrator) invoker.run() true end |