Class: CreateDenshobatoNotifications
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateDenshobatoNotifications
- Defined in:
- lib/generators/denshobato/migrations/create_notifications.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/generators/denshobato/migrations/create_notifications.rb', line 2 def change create_table :denshobato_notifications do |t| t.integer :message_id, index: { name: 'notification_for_message' } t.integer :conversation_id, index: { name: 'notification_for_conversation' } end add_index :denshobato_notifications, [:message_id, :conversation_id], name: 'unique_messages_for_conversations', unique: true end |