created notification model

This commit is contained in:
nilsding 2014-12-13 19:30:10 +01:00
parent 062d458363
commit 61a7b582e4
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,2 @@
class Notification < ActiveRecord::Base
end

View File

@ -0,0 +1,12 @@
class CreateNotifications < ActiveRecord::Migration
def change
create_table :notifications do |t|
t.string :target_type
t.integer :target_id
t.integer :recipient_id
t.boolean :new
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141212193625) do ActiveRecord::Schema.define(version: 20141213182609) 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"
@ -46,6 +46,15 @@ ActiveRecord::Schema.define(version: 20141212193625) do
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "notifications", force: true do |t|
t.string "target_type"
t.integer "target_id"
t.integer "recipient_id"
t.boolean "new"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "questions", force: true do |t| create_table "questions", force: true do |t|
t.string "content" t.string "content"
t.boolean "author_is_anonymous" t.boolean "author_is_anonymous"