created notification model
This commit is contained in:
parent
062d458363
commit
61a7b582e4
|
@ -0,0 +1,2 @@
|
||||||
|
class Notification < ActiveRecord::Base
|
||||||
|
end
|
|
@ -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
|
11
db/schema.rb
11
db/schema.rb
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue