Skip to content

Commit d5be8ce

Browse files
committed
Refactor
1 parent 692c4aa commit d5be8ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/generators/MigrationsGenerator.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ public function buildMigrations():array
138138
*/
139139
protected function createBuilder(DbModel $model):BaseMigrationBuilder
140140
{
141+
$params = [$this->db, $model, $this->config];
141142
if ($this->db->getDriverName() === 'pgsql') {
142-
return Yii::createObject(PostgresMigrationBuilder::class, [$this->db, $model, $this->config]);
143+
return Yii::createObject(PostgresMigrationBuilder::class, $params);
143144
}
144-
return Yii::createObject(MysqlMigrationBuilder::class, [$this->db, $model, $this->config]);
145+
return Yii::createObject(MysqlMigrationBuilder::class, $params);
145146
}
146147

147148
/**

0 commit comments

Comments
 (0)