Module: Rein::Schema
- Included in:
- ActiveRecord::Migration
- Defined in:
- lib/rein/schema.rb
Overview
This module contains methods for creating/dropping schemas.
Instance Method Summary collapse
Instance Method Details
#create_schema(*args) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/rein/schema.rb', line 4 def create_schema(*args) reversible do |dir| dir.up { _create_schema(*args) } dir.down { _drop_schema(*args) } end end |
#drop_schema(*args) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/rein/schema.rb', line 11 def drop_schema(*args) reversible do |dir| dir.up { _drop_schema(*args) } dir.down { _create_schema(*args) } end end |