Chris@0: class CreateComments < ActiveRecord::Migration Chris@0: def self.up Chris@0: create_table :comments do |t| Chris@0: t.column :commented_type, :string, :limit => 30, :default => "", :null => false Chris@0: t.column :commented_id, :integer, :default => 0, :null => false Chris@0: t.column :author_id, :integer, :default => 0, :null => false Chris@0: t.column :comments, :text Chris@0: t.column :created_on, :datetime, :null => false Chris@0: t.column :updated_on, :datetime, :null => false Chris@0: end Chris@0: end Chris@0: Chris@0: def self.down Chris@0: drop_table :comments Chris@0: end Chris@0: end