Sha256: e37c207325b38ebecbc0b0b30598fb508a6d326a80ebec2fd197e64bf218f334

Contents?: true

Size: 339 Bytes

Versions: 1

Compression:

Stored size: 339 Bytes

Contents

class ProhibitNullOnFeederItemStickies < ActiveRecord::Migration
  class Feeder::Item < ActiveRecord::Base; end

  def up
    Feeder::Item.where(sticky: nil).update_all sticky: false

    change_column :feeder_items, :sticky, :boolean, null: false
  end

  def down
    change_column :feeder_items, :sticky, :boolean, null: true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feeder-0.5.1 db/migrate/20140401131911_prohibit_null_on_feeder_item_stickies.rb