# Returns the disk_path value before the execution
attr_reader:old_disk_path
# Returns the disk_path value after the execution
attr_reader:new_disk_path
# Returns the logger currently in use
attr_reader:logger
# Return whether this operation was skipped or not
#
# @return [Boolean] true if skipped of false otherwise
defskipped?
@skipped
end
protected
defmove_folder!(old_path,new_path)
unlessFile.directory?(old_path)
logger.info("Skipped attachments move from '#{old_path}' to '#{new_path}', source path doesn't exist or is not a directory (PROJECT_ID=#{project.id})")
@skipped=true
returntrue
end
ifFile.exist?(new_path)
logger.error("Cannot move attachments from '#{old_path}' to '#{new_path}', target path already exist (PROJECT_ID=#{project.id})")
# Return whether this operation was skipped or not
# This is used in EE for Geo to decide if an event will be triggered or not
#
# @return [Boolean] true if skipped of false otherwise
defskipped?
@skipped
end
private
defmove_folder!(old_path,new_path)
unlessFile.directory?(old_path)
logger.info("Skipped attachments migration from '#{old_path}' to '#{new_path}', source path doesn't exist or is not a directory (PROJECT_ID=#{project.id})")
@skipped=true
returntrue
end
ifFile.exist?(new_path)
logger.error("Cannot migrate attachments from '#{old_path}' to '#{new_path}', target path already exist (PROJECT_ID=#{project.id})")
# Return whether this operation was skipped or not
# This is used in EE for Geo to decide if an event will be triggered or not
#
# @return [Boolean] true if skipped of false otherwise
defskipped?
@skipped
end
private
defmove_folder!(old_path,new_path)
unlessFile.directory?(old_path)
logger.info("Skipped attachments rollback from '#{old_path}' to '#{new_path}', source path doesn't exist or is not a directory (PROJECT_ID=#{project.id})")
@skipped=true
returntrue
end
ifFile.exist?(new_path)
logger.error("Cannot rollback attachments from '#{old_path}' to '#{new_path}', target path already exist (PROJECT_ID=#{project.id})")