Files
ubicloud/migrate/20250429_add_vm_host_family.rb
Enes Cakir c4996b07ef Add migration to add family column to vm host
We plan to introduce a new virtual machine family (performance) for
premium CPU runners. Currently, the allocator uses all hosts without
distinguishing between families. We have different host types with
various CPU models. I added a "family" column to allow the selection of
specific hosts for certain VM families. We also have a "standard-gpu" VM
family, so we can manually change the family of GPU runner hosts and use
the family to filter.
2025-05-13 17:25:23 +03:00

17 lines
307 B
Ruby

# frozen_string_literal: true
Sequel.migration do
up do
alter_table(:vm_host) do
add_column :family, String, collate: '"C"', default: "standard", null: false
set_column_default :family, nil
end
end
down do
alter_table(:vm_host) do
drop_column :family
end
end
end