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