Sha256: def4cf53eec6afe0cd3f0e014a195af5092348bd7edde8156ac79a8207225d84

Contents?: true

Size: 228 Bytes

Versions: 12

Compression:

Stored size: 228 Bytes

Contents

class MoveSectionsToPages < ActiveRecord::Migration
  def self.up
    Section.update_all "type = 'Page'", "type = 'Section' OR type IS NULL"
  end

  def self.down
    Section.update_all "type = NULL", "type = 'Page'"
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
adva-0.2.4 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.2.3 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.2.2 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.2.1 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.2.0 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.1.4 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.1.3 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.1.2 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.1.1 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.1.0 db/migrate/20090305123429_move_sections_to_pages.rb
adva_cms-0.0.1 db/migrate/20090305123429_move_sections_to_pages.rb
adva-0.0.1 adva_cms/db/migrate/20090305123429_move_sections_to_pages.rb