Sha256: c2a3b27de3bfff9ea4556089d4d8b26099177dc7e07edb6fd568312232b4407d

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

class CreatePosts < ActiveRecord::Migration
  def self.up
    create_table :posts do |t|
      t.string     :title,     :required => true
      t.string     :path,      :required => true
      t.string     :teaser
      t.datetime   :posted_at
      t.text       :body
      t.string     :author
      t.boolean    :live,      :default  => true
      t.timestamps
    end
  end

  def self.down
    drop_table :posts
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_essential_blog-0.1.0 lib/generators/templates/db/migrate/create_posts.rb
spree_essential_blog-0.1.0.rc1 lib/generators/templates/db/migrate/create_posts.rb