Skip to content

Commit d988eb6

Browse files
committed
fixed generation of indexes.
1 parent 4694b7f commit d988eb6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/Integration/Service/Generator/Compiler/MigrationCompilerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@ public function testGenerateByResultWorksWithPrimaryKey(): void
6161
[
6262
'test_table' => [
6363
'table' => [$fieldEntity],
64-
'primary' => $primaryKey,
64+
'primaryKey' => [$primaryKey],
6565
],
6666
]
6767
);
68-
dd($result->getResults());
6968
$this->compiler->generateByResult($result);
7069
$result = $this->compiler->getRenderedTemplate();
71-
file_put_contents($this->resourceFolder . '/ExpectedResults/migrationCompilerResultWithPrimary.txt', $result);
7270
self::assertStringEqualsFile(
7371
$this->resourceFolder . '/ExpectedResults/migrationCompilerResultWithPrimary.txt',
7472
$result

tests/Resources/ExpectedResults/migrationCompilerResultWithPrimary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ return new class extends Migration
1818
'test_table',
1919
static function (Blueprint $table) {
2020
$table->bigInteger('test', true)->unsigned();
21+
$table->primary(['test'], 'PRIMARY');
2122

2223
}
2324
);

0 commit comments

Comments
 (0)