Skip to content

Commit 86310b4

Browse files
author
Bizley
authored
Reset vars (#89)
1 parent 6af6419 commit 86310b4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/Arranger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public function __construct(TableMapperInterface $mapper)
3434
*/
3535
public function arrangeTables(array $inputTables): void
3636
{
37+
$this->dependencies = [];
38+
$this->referencesToPostpone = [];
39+
$this->tablesInOrder = [];
40+
3741
foreach ($inputTables as $inputTable) {
3842
$this->addDependency($inputTable);
3943
$foreignKeys = $this->mapper->getStructureOf($inputTable)->getForeignKeys();

src/controllers/MigrationController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
* Generates migration files based on the existing database table and previous migrations.
4646
*
4747
* @author Paweł Bizley Brzozowski
48-
* @version 4.0.0
48+
* @version 4.0.1
4949
* @license Apache 2.0
5050
* https://github.com/bizley/yii2-migration
5151
*/
5252
class MigrationController extends BaseMigrationController
5353
{
5454
/** @var string */
55-
private $version = '4.0.0';
55+
private $version = '4.0.1';
5656

5757
/**
5858
* @var string|array<string> Directory storing the migration classes.

src/renderers/ColumnRenderer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ public function renderDefinition(
192192
string $engineVersion = null
193193
): ?string {
194194
$this->definition = [];
195+
$this->isPrimaryKeyPossible = true;
196+
$this->isNotNullPossible = true;
197+
$this->isUnsignedPossible = true;
195198

196199
$this->buildColumnDefinition($column, $primaryKey, $schema, $engineVersion);
197200
$this->buildGeneralDefinition($column, $primaryKey, $schema);

0 commit comments

Comments
 (0)