Sha256: c0674b02ecfbc099da61cb20d50cf22bf2600b02f16b06cbeba280af7a6d883e

Contents?: true

Size: 735 Bytes

Versions: 7

Compression:

Stored size: 735 Bytes

Contents

class CreateWupeeNotificationTypeConfigurations < ActiveRecord::Migration
  def change
    create_table :wupee_notification_type_configurations do |t|
      t.belongs_to :notification_type
      t.belongs_to :receiver, polymorphic: true
      t.integer :value, default: 0
      t.timestamps null: false
    end

    add_foreign_key :wupee_notification_type_configurations, :wupee_notification_types, column: :notification_type_id
    add_index :wupee_notification_type_configurations, [:notification_type_id], name: "idx_wupee_notif_type_config_on_notification_type_id"
    add_index :wupee_notification_type_configurations, [:receiver_type, :receiver_id], name: "idx_wupee_notif_typ_config_on_receiver_type_and_receiver_id"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wupee-1.1.4 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.1.3 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.1.2 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.0.4 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.0.3 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.0.2 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb
wupee-1.0.1 db/migrate/20151029113101_create_wupee_notification_type_configurations.rb