class AddSendWindowToMailings < ActiveRecord::Migration[8.1] def change change_table :mailings do |t| t.boolean :send_window_enabled, default: false, null: false t.integer :send_window_start_minutes t.integer :send_window_end_minutes t.datetime :next_send_at end add_index :mailings, [:status, :next_send_at] end end