1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-28 22:54:18 +01:00
fab-manager/db/migrate/20150429100442_create_notifications.rb
2015-05-05 03:10:25 +02:00

17 lines
471 B
Ruby

class CreateNotifications < ActiveRecord::Migration
def change
create_table :notifications do |t|
t.integer :receiver_id
t.references :attached_object, polymorphic: true
t.integer :notification_type_id
t.boolean :is_read, default: false
t.string :receiver_type
t.boolean :is_send, default: false
t.timestamps
end
add_index :notifications, :receiver_id
add_index :notifications, :notification_type_id
end
end