Skip to content

Commit c801dc2

Browse files
committed
Merge branch 'mrrobot47-update/base-migration' into develop-v4
2 parents 19d796a + 5346a00 commit c801dc2

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

php/EE/Migration/Base.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22

33
namespace EE\Migration;
44

5+
use Symfony\Component\Filesystem\Filesystem;
6+
57
abstract class Base {
68

7-
public $status = 'incomplete';
9+
public $status = 'incomplete';
10+
protected $is_first_execution;
11+
protected $skip_this_migration;
12+
protected $backup_dir;
13+
protected $backup_file;
14+
protected $fs;
15+
16+
public function __construct() {
17+
$this->fs = new Filesystem();
18+
$this->skip_this_migration = false;
19+
$this->is_first_execution = ! \EE\Model\Option::get( 'version' );
20+
$this->backup_dir = EE_BACKUP_DIR;
21+
$this->fs->mkdir( $this->backup_dir );
22+
}
23+
24+
abstract public function up();
825

9-
abstract public function up();
10-
abstract public function down();
11-
}
26+
abstract public function down();
27+
}

0 commit comments

Comments
 (0)