# depicter/1.3.3/app/src/Editor/Migrations/JobsQueue.php

Depicter — Popup &amp; Slider Builder, version 1.3.3. 27 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.3.3/code/app/src/Editor/Migrations/JobsQueue.php
- Raw: https://pluginprobe.com/plugins/depicter/1.3.3/raw/app/src/Editor/Migrations/JobsQueue.php
- Modified: 2022-07-25T11:57:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/depicter/1.3.3/code/app/src/Editor/Migrations/JobsQueue.php#L10-L20`.

```php
<?php
namespace Depicter\Editor\Migrations;


class JobsQueue
{

	public function migrate(){
		$jobsList = \Depicter::storage()->filesystem()->scan(__DIR__);

		$latestExecutedJob = \Depicter::options()->get('last_document_migration', 0 );
		foreach( $jobsList as $key => $job ) {
			if ( $job['name'] == 'JobsQueue.php' ) {
				continue;
			}

			$jobName = basename( $job['name'], '.php');
			$jobVersion = str_replace( 'Version', '', $jobName );
			if ( $jobVersion > $latestExecutedJob ) {
				$jobClassName = "Depicter\Editor\Migrations\\" . $jobName;
				( new $jobClassName() )->up();
				\Depicter::options()->set( 'last_document_migration', $jobVersion );
			}
		}
	}
}

```
