Sha256: cf0f6de88104f38e1b34f0a64e5e4b2095249b77ed6879d6372561d4c5bbb934

Contents?: true

Size: 290 Bytes

Versions: 2

Compression:

Stored size: 290 Bytes

Contents

class AddImageIdToNewsItems < ActiveRecord::Migration

  def self.up
    unless ::NewsItem.column_names.map(&:to_sym).include?(:image_id)
      add_column ::NewsItem.table_name, :image_id, :integer
    end
  end

  def self.down
    remove_column ::NewsItem.table_name, :image_id
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-news-1.2.0 db/migrate/4_add_image_id_to_news_items.rb
refinerycms-news-1.1.0 db/migrate/4_add_image_id_to_news_items.rb