2013-11-22 21:55:21 +08:00
|
|
|
class CreateMemos < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :memos do |t|
|
|
|
|
t.integer :forum_id, :null => false
|
|
|
|
t.integer :parent_id, null: true
|
|
|
|
t.string :subject, null: false
|
|
|
|
t.text :content, null: false
|
|
|
|
t.integer :author_id, null: false
|
2013-11-23 20:56:22 +08:00
|
|
|
t.integer :replies_count, default: 0
|
2013-11-22 21:55:21 +08:00
|
|
|
t.integer :last_reply_id
|
|
|
|
t.boolean :lock, default: false
|
|
|
|
t.boolean :sticky, default: false
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|