Sha256: 5fe2fbfe31894b39a1ccafbd001d5f600d89f35362bf9308ca0721b1d8171bd0

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

class AddRenderBaseLayoutFlag < ActiveRecord::Migration
  def self.up
    unless columns(:website_sections).collect {|c| c.name}.include?('render_base_layout')
      add_column :website_sections, :render_base_layout, :string, :default => true
    end
  end

  def self.down
    if columns(:website_sections).collect {|c| c.name}.include?('render_base_layout')
      remove_column :website_sections, :render_base_layout
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
knitkit-2.0.11 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.10 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.9 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.7 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.6 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.5 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.4 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.3 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.2 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb
knitkit-2.0.1 db/migrate/upgrade/20120116201510_add_render_base_layout_flag.rb