class CreateCovidFormOptions < ActiveRecord::Migration[6.0]
  def change
    create_table :covid_form_options do |t|
      t.references :field, null: false, index: false,
        foreign_key: { to_table: :covid_form_fields }

      t.string :value, null: false, limit: 128
      t.integer :sequence, null: false

      t.timestamps

      t.index [:field_id, :sequence]
    end
  end
end
