Sha256: 411d109e5d7550b9a5d07a32b1f563ada8d14cd588c0d78ccbeaa46f317f714b
Contents?: true
Size: 908 Bytes
Versions: 16
Compression:
Stored size: 908 Bytes
Contents
class CreateMartyNotificationsDeliveries < ActiveRecord::Migration[4.2] def change create_table :marty_notifications_deliveries do |t| t.integer :notification_id, null: false t.integer :recipient_id t.string :delivery_type, null: false t.string :state, null: false t.text :text, null: false, default: '' t.string :error_text, null: false, default: '' t.timestamps null: false end add_foreign_key :marty_notifications_deliveries, :marty_notifications, column: :notification_id, on_delete: :cascade add_foreign_key :marty_notifications_deliveries, :marty_users, column: :recipient_id, on_delete: :nullify add_index :marty_notifications_deliveries, [:notification_id, :recipient_id, :delivery_type], unique: true, name: :index_marty_notifications_deliveries_on_n_id_r_id_and_type end end
Version data entries
16 entries across 16 versions & 1 rubygems