Sha256: a5b2253e509ef2c75465d3bb077e43756f64cbd7e17c3059e609b1cbdd708f64

Contents?: true

Size: 553 Bytes

Versions: 4

Compression:

Stored size: 553 Bytes

Contents

class AddCommentsToPosts < ActiveRecord::Migration
  def self.up
    create_table "posts", :force => true do |t|
      t.column "title", :string
      t.column "body", :text
      t.column "created_at", :datetime
      t.column "updated_at", :datetime
    end
    create_table "comments" do |t|
     t.column "post_id", :integer
     t.column "name", :string
     t.column "body", :text
     t.column "created_at", :datetime
     t.column "updated_at", :datetime
    end
  end

  def self.down
    drop_table "comments"
    drop_table "posts"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
merb-0.0.7 examples/sample_app/dist/schema/migrations/001_add_comments_to_posts.rb
merb-0.0.5 examples/sample_app/dist/schema/migrations/001_add_comments_to_posts.rb
merb-0.0.6 examples/sample_app/dist/schema/migrations/001_add_comments_to_posts.rb
merb-0.0.8 examples/sample_app/dist/schema/migrations/001_add_comments_to_posts.rb