class CreatePosts < ActiveRecord::Migration
  def self.up
    create_table :posts do |t|
      t.column :parent_id, :integer
      t.column :lft, :integer
      t.column :rgt, :integer
      t.column :subject, :string
      t.column :body, :text
    end
    
    Post.create :subject => "O czym myślisz?"
  end

  def self.down
    drop_table :posts
  end
end