To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / db / migrate / 010_create_comments.rb @ 912:5e80956cc792

History | View | Annotate | Download (524 Bytes)

1
class CreateComments < ActiveRecord::Migration
2
  def self.up
3
    create_table :comments do |t|
4
      t.column :commented_type, :string, :limit => 30, :default => "", :null => false
5
      t.column :commented_id, :integer, :default => 0, :null => false
6
      t.column :author_id, :integer, :default => 0, :null => false
7
      t.column :comments, :text
8
      t.column :created_on, :datetime, :null => false
9
      t.column :updated_on, :datetime, :null => false
10
    end
11
  end
12

    
13
  def self.down
14
    drop_table :comments
15
  end
16
end