Skip to content

Instantly share code, notes, and snippets.

@eduardomartines
Created September 7, 2014 05:17
Show Gist options
  • Save eduardomartines/8c8748139e4b2bbca02d to your computer and use it in GitHub Desktop.
Save eduardomartines/8c8748139e4b2bbca02d to your computer and use it in GitHub Desktop.
Tabela de notificações
create_table "notifications", :force => true do |t|
t.integer "notified_id", :null => false
t.string "notified_type", :limit => 7, :null => false
t.integer "notifier_id", :null => false
t.string "notifier_type", :limit => 7, :null => false
t.integer "target_id", :default => 0, :null => false
t.string "target_type", :limit => 9, :default => "Undefined", :null => false
t.string "target_aggregation", :default => "", :null => false
t.string "action_type", :limit => 8, :null => false
t.boolean "read", :default => false, :null => false
t.datetime "created_at", :null => false
end
add_index "notifications", ["notified_id", "notified_type", "notifier_id", "notifier_type", "target_id", "target_type", "action_type"], :name => "index_notifications", :unique => true
add_index "notifications", ["notified_id", "notified_type"], :name => "index_notifications_on_notified_id_and_notified_type"
add_index "notifications", ["notifier_id", "notifier_type"], :name => "index_notifications_on_notifier_id_and_notifier_type"
add_index "notifications", ["read"], :name => "index_notifications_on_read"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment