class CreateSparkpostSuppressions < ActiveRecord::Migration[6.0]
  def change
    create_table :SparkpostSuppressions, primary_key: :SSID do |t|
      t.integer :SchoolID, null: false
      t.string :TransmissionID, null: false
      t.string :Email, null: false
      t.string :Reason
      t.integer :Type, null: false
      t.datetime :CreatedAt, null: false
    end

    add_foreign_key :SparkpostSuppressions, :Schools, column: :SchoolID,
      primary_key: :SchoolID
  end
end
