src/Migration/Repository/Mapper/Definition.php 1 location
|
@@ 43-53 (lines=11) @@
|
| 40 |
|
* @param MigrationInterface $migration |
| 41 |
|
* @param null|string|ValueObjectInterface $id Overrides the ID for the migration with the specified ID |
| 42 |
|
*/ |
| 43 |
|
public function __construct(MigrationInterface $migration, $id = null) |
| 44 |
|
{ |
| 45 |
|
if (null === $id) { |
| 46 |
|
$id = VersionId::fromMigration($migration); |
| 47 |
|
} else { |
| 48 |
|
$id = new VersionId((string) $id); |
| 49 |
|
} |
| 50 |
|
$this->id = $id; |
| 51 |
|
|
| 52 |
|
$this->migration = $migration; |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* @inheritdoc |
src/Version/Version.php 1 location
|
@@ 50-59 (lines=10) @@
|
| 47 |
|
* |
| 48 |
|
* @throws \Baleen\Migrations\Exception\InvalidArgumentException |
| 49 |
|
*/ |
| 50 |
|
public function __construct(MigrationInterface $migration, $migrated, VersionId $id = null) |
| 51 |
|
{ |
| 52 |
|
if (null === $id) { |
| 53 |
|
$id = VersionId::fromMigration($migration); |
| 54 |
|
} |
| 55 |
|
$this->id = $id; |
| 56 |
|
|
| 57 |
|
$this->migration = $migration; |
| 58 |
|
$this->migrated = (bool) $migrated; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
/** |
| 62 |
|
* @inheritdoc |