Files
ubicloud/migrate/20230804_host_reboot.rb
Hadi Moshayedi 4aee02110c Semaphore to reboot host
This will make sure that state of VMs on the host is updated when
rebooting host, and that they start after the host is up.

An example of invoking this is:

```
> VmHost.first.incr_reboot
```
2023-08-06 17:17:43 -07:00

13 lines
262 B
Ruby

# frozen_string_literal: true
Sequel.migration do
change do
add_enum_value(:vm_display_state, "rebooting")
add_enum_value(:vm_display_state, "starting")
alter_table(:vm_host) do
add_column :last_boot_id, :text, null: true
end
end
end