configures act_as_commentable_with_threading gem [#7]
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
class ActsAsCommentableWithThreadingMigration < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :comments, :force => true do |t|
|
||||
t.integer :commentable_id
|
||||
t.string :commentable_type
|
||||
t.string :title
|
||||
t.text :body
|
||||
t.string :subject
|
||||
t.integer :user_id, :null => false
|
||||
t.integer :parent_id, :lft, :rgt
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :comments, :user_id
|
||||
add_index :comments, [:commentable_id, :commentable_type]
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :comments
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user