Migrate comment table

This commit is contained in:
Felix Wolff
2015-03-27 11:53:37 +01:00
parent e31675f136
commit 6e5e9a6634
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,14 @@
class CreateComments < ActiveRecord::Migration
def change
create_table :comments do |t|
t.references :user, index: true
t.references :file, index: true
t.string :user_type
t.integer :row
t.integer :column
t.string :text
t.timestamps
end
end
end

View File

@ -16,6 +16,20 @@ ActiveRecord::Schema.define(version: 20150317115338) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
create_table "comments", force: true do |t|
t.integer "user_id"
t.integer "file_id"
t.string "user_type"
t.integer "row"
t.integer "column"
t.string "text"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "comments", ["file_id"], name: "index_comments_on_file_id", using: :btree
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree
create_table "consumers", force: true do |t| create_table "consumers", force: true do |t|
t.string "name" t.string "name"
t.datetime "created_at" t.datetime "created_at"