Commit 24c2db2d authored by Krasimir Angelov's avatar Krasimir Angelov

Ensure BacthedMigration and BatchedJob always have pause_ms attribute

Define `pause_ms` attribute for both `BatchedMigration` and `BatchedJob`
models to make sure older migrations will execute even if the column is
not created in the DB yet.

See https://gitlab.com/gitlab-org/gitlab/-/issues/328816.
parent f9631484
......@@ -17,6 +17,8 @@ module Gitlab
delegate :aborted?, :job_class, :table_name, :column_name, :job_arguments,
to: :batched_migration, prefix: :migration
attribute :pause_ms, :integer, default: 100
end
end
end
......
......@@ -23,6 +23,8 @@ module Gitlab
finished: 3
}
attribute :pause_ms, :integer, default: 100
def self.active_migration
active.queue_order.first
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment