Sha256: a42adbf3c2a59d95d81f74f1c59a244fde096c94aa46b9e9c0e65a001c434573

Contents?: true

Size: 770 Bytes

Versions: 2

Compression:

Stored size: 770 Bytes

Contents

class CreateWupeeNotifications < ActiveRecord::Migration
  def change
    create_table :wupee_notifications do |t|
      t.references :receiver, polymorphic: true, index: { name: 'idx_wupee_notifications_on_receiver_id' }
      t.references :attached_object, polymorphic: true, index: { name: 'idx_wupee_notifications_on_attached_object_id' }
      t.integer :notification_type_id
      t.boolean :is_read, default: false
      t.boolean :is_sent, default: false
      t.boolean :is_wanted, default: true

      t.timestamps null: false
    end

    add_index :wupee_notifications, :notification_type_id, name: 'idx_wupee_notifications_on_notification_type_id'
    add_foreign_key :wupee_notifications, :wupee_notification_types, column: :notification_type_id
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wupee-2.0.0.beta2 db/migrate/20151029113107_create_wupee_notifications.rb
wupee-2.0.0.beta1 db/migrate/20151029113107_create_wupee_notifications.rb