2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2021-05-31 13:51:29 +00:00
|
|
|
require_dependency 'tasks/zammad/command.rb'
|
|
|
|
|
|
|
|
module Tasks
|
|
|
|
module Zammad
|
|
|
|
module Package
|
|
|
|
# Package migrations must not be executed in the same process that also executed
|
|
|
|
# Package.install or Package.link, as the codebase is in an inconsistent state.
|
|
|
|
# This is enforced by Tasks:Zammad::Command which prevents command chaining.
|
|
|
|
class Migrate < Tasks::Zammad::Command
|
|
|
|
|
|
|
|
def self.task_handler
|
|
|
|
puts 'Executing all pending package migrations...'
|
|
|
|
::Package.migration_execute
|
2021-06-09 12:43:05 +00:00
|
|
|
::Package::Migration.linked
|
2021-05-31 13:51:29 +00:00
|
|
|
puts 'done.'
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|