Sha256: eb8305151d3a2781c086d871ff5495370b0fed4d3a235323398921cce744c449

Contents?: true

Size: 437 Bytes

Versions: 2

Compression:

Stored size: 437 Bytes

Contents

class CreateNewsItems < ActiveRecord::Migration

  def self.up
    create_table ::NewsItem.table_name, :id => true do |t|
      t.string :title
      t.text :body
      t.datetime :publish_date

      t.timestamps
    end

    add_index ::NewsItem.table_name, :id
  end

  def self.down
    ::UserPlugin.destroy_all :name => "refinerycms_news"

    ::Page.delete_all :link_url => "/news"

    drop_table ::NewsItem.table_name
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-news-1.2.0 db/migrate/1_create_news_items.rb
refinerycms-news-1.1.0 db/migrate/1_create_news_items.rb