socialforge/db/migrate/20131122020026_create_forum...

14 lines
451 B
Ruby
Raw Normal View History

2013-11-22 10:24:15 +08:00
class CreateForums < ActiveRecord::Migration
2013-11-22 21:55:21 +08:00
def change
create_table :forums do |t|
t.column "name", :string, :default => nil, :null => false
t.column "description", :string, :default => '', :null => true
t.column "topic_count", :integer, :default => 0
t.column "memo_count", :integer, :default => 0
t.column "last_memo_id",:integer, :default => 0
t.column "creator_id", :integer, :null => false
t.timestamps
end
end
2013-11-22 10:24:15 +08:00
end