This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
tuxbliki/schema/migrations/004_add_comments.rb

18 lines
403 B
Ruby
Raw Normal View History

2008-06-27 00:13:15 -04:00
class AddComments < ActiveRecord::Migration
def self.up
create_table :comments do |t|
t.string :user, :limit => 32
t.string :url, :limit => 256
t.timestamp :created_at
t.integer :author_id
t.integer :page_id
t.text :comment
end
add_index :comments, :author_id
add_index :comments, :page_id
end
def self.down
drop_table :comments
end
end