fixing conflicts [#9]

This commit is contained in:
rgarcia
2015-07-18 18:19:00 +02:00
13 changed files with 210 additions and 7 deletions

View File

@@ -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

View File

@@ -11,7 +11,24 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150718075337) do
ActiveRecord::Schema.define(version: 20150718091702) do
create_table "comments", force: :cascade 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"
t.integer "lft"
t.integer "rgt"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type"
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
create_table "debates", force: :cascade do |t|
t.string "title"