Class: CortexReaver::DraftSchema
- Inherits:
-
Sequel::Migration
- Object
- Sequel::Migration
- CortexReaver::DraftSchema
- Defined in:
- lib/cortex_reaver/migrations/013_draft.rb
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
3 4 5 6 7 8 |
# File 'lib/cortex_reaver/migrations/013_draft.rb', line 3 def down alter_table(:pages) { drop_column :draft } alter_table(:projects) { drop_column :draft } alter_table(:journals) { drop_column :draft } alter_table(:photographs) { drop_column :draft } end |
#up ⇒ Object
10 11 12 13 14 15 |
# File 'lib/cortex_reaver/migrations/013_draft.rb', line 10 def up alter_table(:pages) { add_column :draft, :boolean, :default => false } alter_table(:projects) { add_column :draft, :boolean, :default => false } alter_table(:journals) { add_column :draft, :boolean, :default => false } alter_table(:photographs) { add_column :draft, :boolean, :default => false } end |