Class: CreateOptIns
- Inherits:
-
Object
- Object
- CreateOptIns
- Defined in:
- lib/generators/noticent/templates/create_opt_ins.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/noticent/templates/create_opt_ins.rb', line 2 def change create_table :opt_ins, force: true do |t| t.integer :recipient_id, null: false t.integer :entity_id, null: false t.string :scope, null: false t.string :alert_name, null: false t.string :channel_name, null: false t. end add_index :opt_ins, %i[recipient_id entity_id scope alert_name channel_name], unique: true, name: :unique_composite_key end |