PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.18
ووسلام – همگام سازی ووکامرس و باسلام v1.10.18
1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 1.8.7 1.8.4 All 51 releases
sync-basalam / includes / Migrations / MigrationManager.php

MigrationManager.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.18, at includes/Migrations/MigrationManager.php

53 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SyncBasalam\Migrations;
4
5 use SyncBasalam\Migrations\Versions\Migration_1_3_0;
6 use SyncBasalam\Migrations\Versions\Migration_1_3_2;
7 use SyncBasalam\Migrations\Versions\Migration_1_3_8;
8 use SyncBasalam\Migrations\Versions\Migration_1_4_0;
9 use SyncBasalam\Migrations\Versions\Migration_1_4_1;
10 use SyncBasalam\Migrations\Versions\Migration_1_6_2;
11 use SyncBasalam\Migrations\Versions\Migration_1_7_8;
12 use SyncBasalam\Migrations\Versions\Migration_1_8_0;
13 use SyncBasalam\Migrations\Versions\Migration_1_8_1;
14 use SyncBasalam\Migrations\Versions\Migration_1_8_5;
15 use SyncBasalam\Migrations\Versions\Migration_1_8_7;
16 use SyncBasalam\Migrations\Versions\Migration_1_10_6;
17 use SyncBasalam\Migrations\Versions\Migration_1_10_8;
18
19 defined('ABSPATH') || exit;
20
21 class MigrationManager
22 {
23 private $migrations = [];
24
25 public function __construct()
26 {
27 $this->migrations = [
28 '1.3.0' => new Migration_1_3_0(),
29 '1.3.2' => new Migration_1_3_2(),
30 '1.3.8' => new Migration_1_3_8(),
31 '1.4.0' => new Migration_1_4_0(),
32 '1.4.1' => new Migration_1_4_1(),
33 '1.6.2' => new Migration_1_6_2(),
34 '1.7.8' => new Migration_1_7_8(),
35 '1.8.0' => new Migration_1_8_0(),
36 '1.8.1' => new Migration_1_8_1(),
37 '1.8.5' => new Migration_1_8_5(),
38 '1.8.7' => new Migration_1_8_7(),
39 '1.10.6' => new Migration_1_10_6(),
40 '1.10.8' => new Migration_1_10_8(),
41 ];
42 }
43
44 public function runMigrations($currentVersion, $newVersion)
45 {
46 foreach ($this->migrations as $version => $migration) {
47 if (version_compare($currentVersion, $version, '<')) $migration->up();
48 }
49
50 update_option('sync_basalam_version', $newVersion);
51 }
52 }
53