Sha256: bc598ed7cab7fde11cdaf93bf44a5e494b38937cdede5efef346f022ad2b66b3

Contents?: true

Size: 364 Bytes

Versions: 18

Compression:

Stored size: 364 Bytes

Contents

class AddInUrlToPages < ActiveRecord::Migration
  def self.up
    add_column 'constructor_pages_pages', :in_url, :boolean, default: true

    ConstructorPages::Page.reset_column_information

    ConstructorPages::Page.all.each do |p|
      p.in_url = true
      p.save
    end

  end

  def self.down
    remove_column 'constructor_pages_pages', :in_url
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
constructor-pages-1.0.0beta2 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-1.0.0beta1 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.9.1 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.9.0 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.19 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.18 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.17 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.16 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.15 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.14 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.13 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.12 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.11 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.10 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.8 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.7 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.6 db/migrate/13_add_in_url_to_pages.rb
constructor-pages-0.8.5 db/migrate/13_add_in_url_to_pages.rb