tag unit test
This commit is contained in:
17
db/migrate/20100205162521_create_tags.rb
Normal file
17
db/migrate/20100205162521_create_tags.rb
Normal 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
|
||||
Reference in New Issue
Block a user