Class: CreateNotification
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateNotification
- Defined in:
- lib/generators/notify_with/install/templates/create_notification.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/notify_with/install/templates/create_notification.rb', line 2 def change create_table :notify_with_notifications do |t| t.references :receiver, polymorphic: true t.references :attached_object, polymorphic: true t.integer :notification_type_id t.boolean :is_read, default: false t.boolean :is_send, default: false t. null: false end end |