| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\GlobalClasses\Database; |
| 4 |
|
| 5 |
use Elementor\Core\Database\Base_Database_Updater; |
| 6 |
use Elementor\Modules\GlobalClasses\Database\Migrations\Add_Capabilities; |
| 7 |
use Elementor\Modules\GlobalClasses\Database\Migrations\Migrate_All_Kits_Post_IDs; |
| 8 |
use Elementor\Modules\GlobalClasses\Database\Migrations\Migrate_To_Posts; |
| 9 |
use Elementor\Modules\GlobalClasses\Database\Migrations\Reconcile_Downgraded_Posts; |
| 10 |
|
| 11 |
class Global_Classes_Database_Updater extends Base_Database_Updater { |
| 12 |
const DB_VERSION = 4; |
| 13 |
const OPTION_NAME = 'elementor_global_classes_db_version'; |
| 14 |
|
| 15 |
protected function get_migrations(): array { |
| 16 |
return [ |
| 17 |
1 => new Add_Capabilities(), |
| 18 |
2 => new Migrate_To_Posts(), |
| 19 |
3 => new Reconcile_Downgraded_Posts(), |
| 20 |
4 => new Migrate_All_Kits_Post_IDs(), |
| 21 |
]; |
| 22 |
} |
| 23 |
|
| 24 |
protected function get_db_version() { |
| 25 |
return static::DB_VERSION; |
| 26 |
} |
| 27 |
|
| 28 |
protected function get_db_version_option_name(): string { |
| 29 |
return static::OPTION_NAME; |
| 30 |
} |
| 31 |
} |
| 32 |
|