Skip to content

Commit 787f179

Browse files
committed
fix blueprint
1 parent f2ecb3e commit 787f179

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

Diff for: src/Schema/Blueprint.php

-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ class Blueprint extends BaseBlueprint
2626
{
2727
protected $commands = [];
2828

29-
public function setTable(string $table): self
30-
{
31-
$this->table = $table;
32-
return $this;
33-
}
34-
3529
/**
3630
* @return AttachPartitionDefinition|Fluent
3731
*/

Diff for: src/Schema/Builder.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ public function getViewDefinition($view): string
7171
*/
7272
protected function createBlueprint($table, Closure $callback = null)
7373
{
74-
$blueprint = new Blueprint($this->connection, $this->grammar);
75-
$blueprint->setTable($table);
76-
if ($callback instanceof Closure) {
77-
$callback($blueprint);
78-
}
79-
return $blueprint;
74+
return new Blueprint($this->connection, $table, $callback);
8075
}
8176
}

Diff for: tests/Unit/Helpers/BlueprintAssertions.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public function initializeMock(string $table)
2929
$this->postgresConnection = $this->createMock(PostgresConnection::class);
3030
$this->postgresGrammar = new PostgresGrammar($this->postgresConnection);
3131
$this->postgresConnection->setSchemaGrammar($this->postgresGrammar);
32-
$this->blueprint = new Blueprint($this->postgresConnection, $this->postgresGrammar);
33-
$this->blueprint->setTable($table);
32+
$this->blueprint = new Blueprint($this->postgresConnection, $table);
3433
}
3534

3635
/**

0 commit comments

Comments
 (0)