Sequel.migration do

  up do
    # create tests table
    create_table(:results) do
      primary_key :id
      foreign_key :hardware_id, :hardware
      foreign_key :benchmark_id, :benchmarks
      Float :avg_score, null: false
      Float :min_score
      Float :max_score
      DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
      DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
    end
  end

  down do
    drop_table(:results)
  end

end
