| 1 | <?php declare(strict_types=1); |
||
| 20 | abstract class AbstractMigration |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var Db; |
||
| 24 | */ |
||
| 25 | protected $db; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Db $db |
||
| 29 | */ |
||
| 30 | 12 | final public function __construct(Db $db) |
|
| 34 | |||
| 35 | 9 | public function getNumber(): int |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Actions to be performed when migrating up to this version (e.g. 6.1.0 -> 6.2.0) |
||
| 46 | */ |
||
| 47 | abstract public function up(): void; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Actions to be performed when migrating down from this version (e.g. 6.2.0 -> 6.0.0) |
||
| 51 | */ |
||
| 52 | 2 | public function down(): void |
|
| 55 | } |
||
| 56 |