tag unit test

This commit is contained in:
Albert Yi
2010-02-06 23:11:26 -05:00
parent 305f4d4607
commit 341a24e22e
8 changed files with 403 additions and 11 deletions

View File

@@ -0,0 +1,17 @@
class CreateTags < ActiveRecord::Migration
def self.up
create_table :tags do |t|
t.column :name, :string, :null => false
t.column :post_count, :integer, :null => false, :default => 0
t.column :category, :integer, :null => false, :default => 0
t.column :related_tags, :text
t.timestamps
end
add_index :tags, :name, :unique => true
end
def self.down
drop_table :tags
end
end