Sha256: 32d15f39f6bbd439d5c3f0ce4610d9c508ece88a677fba61ae2bb1982d5255d0

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

if ActiveRecord.gem_version >= Gem::Version.new('5.0')
  class AddMembersOnlyFlagToPiccoBlogPosts < ActiveRecord::Migration[4.2]; end
else
  class AddMembersOnlyFlagToPiccoBlogPosts < ActiveRecord::Migration; end
end

AddMembersOnlyFlagToPiccoBlogPosts.class_eval do
  def change
    add_column :picco_blog_posts, :members_only, :boolean, default: false
    add_index :picco_blog_posts, :members_only
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picco_blog-1.4.3 db/migrate/20161228031714_add_members_only_flag_to_picco_blog_posts.rb
picco_blog-1.4.2 db/migrate/20161228031714_add_members_only_flag_to_picco_blog_posts.rb
picco_blog-1.4.1 db/migrate/20161228031714_add_members_only_flag_to_picco_blog_posts.rb