To be able to allocate cpus to each of the host, we want to create a record for each VmHost's CPU which tracks its availability.
15 lines
375 B
Ruby
15 lines
375 B
Ruby
# frozen_string_literal: true
|
|
|
|
Sequel.migration do
|
|
change do
|
|
create_table :vm_host_cpu do
|
|
foreign_key :vm_host_id, :vm_host, type: :uuid, null: false
|
|
Integer :cpu_number, null: false
|
|
Boolean :spdk, null: false
|
|
foreign_key :vm_host_slice_id, :vm_host_slice, type: :uuid, null: true
|
|
|
|
primary_key [:vm_host_id, :cpu_number]
|
|
end
|
|
end
|
|
end
|