Module: ColumnSync::Migration
- Defined in:
- lib/column_sync/migration.rb
Instance Method Summary collapse
Instance Method Details
#sync_columns(columns) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/column_sync/migration.rb', line 5 def sync_columns(columns) FileUtils.mkdir_p("db/functions") FileUtils.mkdir_p("db/triggers") service = Service.new(columns) each_function(service) { |name| create_function(name) } each_trigger(service) { |name, table_name| create_trigger(name, on: table_name) } end |