Sha256: a58edcc066babeef06c03d199cca801d8abca35c32ccd84ec728eb337cbb4668

Contents?: true

Size: 738 Bytes

Versions: 16

Compression:

Stored size: 738 Bytes

Contents

class CreateMartyNotificationsConfig < ActiveRecord::Migration[4.2]
  def change
    create_table :marty_notifications_configs do |t|
      t.pg_enum :event_type, enum: :marty_notifications_event_types, null: false
      t.integer :recipient_id
      t.string :delivery_type, null: false
      t.string :state, null: false
      t.text :text, null: false, default: ''

      t.timestamps null: false
    end

    add_foreign_key :marty_notifications_configs, :marty_users,
                    column: :recipient_id, on_delete: :nullify

    add_index :marty_notifications_configs,
      [:event_type, :recipient_id, :delivery_type],
      unique: true,
      name: :index_marty_notifications_configs_on_event_recipient_delivery
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
marty-14.3.0 db/migrate/522_create_marty_notifications_config.rb
marty-14.0.0 db/migrate/522_create_marty_notifications_config.rb
marty-13.0.2 db/migrate/522_create_marty_notifications_config.rb
marty-11.0.0 db/migrate/522_create_marty_notifications_config.rb
marty-10.0.3 db/migrate/522_create_marty_notifications_config.rb
marty-10.0.2 db/migrate/522_create_marty_notifications_config.rb
marty-10.0.0 db/migrate/522_create_marty_notifications_config.rb
marty-9.5.1 db/migrate/522_create_marty_notifications_config.rb
marty-9.5.0 db/migrate/522_create_marty_notifications_config.rb
marty-9.3.3 db/migrate/522_create_marty_notifications_config.rb
marty-9.3.2 db/migrate/522_create_marty_notifications_config.rb
marty-9.3.0 db/migrate/522_create_marty_notifications_config.rb
marty-8.5.0 db/migrate/522_create_marty_notifications_config.rb
marty-8.4.1 db/migrate/522_create_marty_notifications_config.rb
marty-8.3.1 db/migrate/522_create_marty_notifications_config.rb
marty-8.2.0 db/migrate/522_create_marty_notifications_config.rb