This simplifies the deadline infrastructure. We keep the deadline information in stack frames, however before this commit it used to be possible to have stacks with no frames in them. That means deadlines would need to create the frame themselves if it is not exist. Instead we decided to create the stacks with one frame in them by default. This simplifies the workflows by removing special case. As a side benefit, we don't need to modify Strand.new calls in our unit tests to ensure each of them passes stack as [{}] to accomodate deadlines we are registering.
16 lines
238 B
Ruby
16 lines
238 B
Ruby
# frozen_string_literal: true
|
|
|
|
Sequel.migration do
|
|
up do
|
|
alter_table(:strand) do
|
|
set_column_default(:stack, "[{}]")
|
|
end
|
|
end
|
|
|
|
down do
|
|
alter_table(:strand) do
|
|
set_column_default(:stack, "[]")
|
|
end
|
|
end
|
|
end
|