Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get started on PhinxAdapter #679

Merged
merged 8 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"php": ">=8.1",
"cakephp/cache": "^5.0",
"cakephp/orm": "^5.0",
"robmorgan/phinx": "^0.15.3"
"robmorgan/phinx": "0.x-dev#c35379620f23319329bb9ed17b82f4bdcce2a91e"
},
"require-dev": {
"cakephp/bake": "^3.0",
Expand Down
20 changes: 0 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,6 @@ parameters:
count: 1
path: src/Db/Adapter/AdapterFactory.php

-
message: "#^Call to an undefined method Migrations\\\\Db\\\\Adapter\\\\AdapterInterface\\:\\:getDeleteBuilder\\(\\)\\.$#"
count: 1
path: src/Db/Adapter/AdapterWrapper.php

-
message: "#^Call to an undefined method Migrations\\\\Db\\\\Adapter\\\\AdapterInterface\\:\\:getInsertBuilder\\(\\)\\.$#"
count: 1
path: src/Db/Adapter/AdapterWrapper.php

-
message: "#^Call to an undefined method Migrations\\\\Db\\\\Adapter\\\\AdapterInterface\\:\\:getSelectBuilder\\(\\)\\.$#"
count: 1
path: src/Db/Adapter/AdapterWrapper.php

-
message: "#^Call to an undefined method Migrations\\\\Db\\\\Adapter\\\\AdapterInterface\\:\\:getUpdateBuilder\\(\\)\\.$#"
count: 1
path: src/Db/Adapter/AdapterWrapper.php

-
message: "#^Offset 'id' on non\\-empty\\-array\\<string, mixed\\> in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
Expand Down
14 changes: 8 additions & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@
</RedundantPropertyInitializationCheck>
</file>
<file src="src/Db/Adapter/AdapterWrapper.php">
<DeprecatedMethod>
<code>getQueryBuilder</code>
</DeprecatedMethod>
<InvalidNullableReturnType>
<code>InputInterface</code>
</InvalidNullableReturnType>
<NullableReturnStatement>
<code><![CDATA[$this->adapter->getInput()]]></code>
</NullableReturnStatement>
<UndefinedInterfaceMethod>
<code>getDeleteBuilder</code>
<code>getInsertBuilder</code>
<code>getSelectBuilder</code>
<code>getUpdateBuilder</code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Db/Adapter/MysqlAdapter.php">
<RedundantCondition>
<code>$opened</code>
<code>is_array($newColumns)</code>
</RedundantCondition>
</file>
<file src="src/Db/Adapter/PhinxAdapter.php">
<DeprecatedMethod>
<code>getQueryBuilder</code>
</DeprecatedMethod>
</file>
<file src="src/Db/Adapter/PostgresAdapter.php">
<NoValue>
<code><![CDATA[$options['primary_key']]]></code>
Expand Down
33 changes: 33 additions & 0 deletions src/Db/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
namespace Migrations\Db\Adapter;

use Cake\Database\Query;
use Cake\Database\Query\DeleteQuery;
use Cake\Database\Query\InsertQuery;
use Cake\Database\Query\SelectQuery;
use Cake\Database\Query\UpdateQuery;
use Migrations\Db\Literal;
use Migrations\Db\Table\Column;
use Migrations\Db\Table\Table;
Expand Down Expand Up @@ -283,10 +287,39 @@ public function executeActions(Table $table, array $actions): void;
/**
* Returns a new Query object
*
* @deprecated 4.x Use getSelectBuilder, getInsertBuilder, getUpdateBuilder, getDeleteBuilder instead.
* @return \Cake\Database\Query
*/
public function getQueryBuilder(string $type): Query;

/**
* Return a new SelectQuery object
*
* @return \Cake\Database\Query\SelectQuery
*/
public function getSelectBuilder(): SelectQuery;

/**
* Return a new InsertQuery object
*
* @return \Cake\Database\Query\InsertQuery
*/
public function getInsertBuilder(): InsertQuery;

/**
* Return a new UpdateQuery object
*
* @return \Cake\Database\Query\UpdateQuery
*/
public function getUpdateBuilder(): UpdateQuery;

/**
* Return a new DeleteQuery object
*
* @return \Cake\Database\Query\DeleteQuery
*/
public function getDeleteBuilder(): DeleteQuery;

/**
* Executes a SQL statement.
*
Expand Down
36 changes: 36 additions & 0 deletions src/Db/Adapter/PdoAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
use BadMethodCallException;
use Cake\Database\Connection;
use Cake\Database\Query;
use Cake\Database\Query\DeleteQuery;
use Cake\Database\Query\InsertQuery;
use Cake\Database\Query\SelectQuery;
use Cake\Database\Query\UpdateQuery;
use InvalidArgumentException;
use Migrations\Db\Action\AddColumn;
use Migrations\Db\Action\AddForeignKey;
Expand Down Expand Up @@ -140,18 +144,18 @@
} else {
$table = new DbTable($this->getSchemaTableName(), [], $this);
if (!$table->hasColumn('migration_name')) {
$table
->addColumn(
'migration_name',
'string',
['limit' => 100, 'after' => 'version', 'default' => null, 'null' => true]
)
->save();

Check warning on line 153 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L147-L153

Added lines #L147 - L153 were not covered by tests
}
if (!$table->hasColumn('breakpoint')) {
$table
->addColumn('breakpoint', 'boolean', ['default' => false, 'null' => false])
->save();

Check warning on line 158 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L156-L158

Added lines #L156 - L158 were not covered by tests
}
}

Expand Down Expand Up @@ -247,6 +251,38 @@
};
}

/**
* @inheritDoc
*/
public function getSelectBuilder(): SelectQuery
{
return $this->getDecoratedConnection()->selectQuery();
}

/**
* @inheritDoc
*/
public function getInsertBuilder(): InsertQuery
{
return $this->getDecoratedConnection()->insertQuery();
}

/**
* @inheritDoc
*/
public function getUpdateBuilder(): UpdateQuery
{
return $this->getDecoratedConnection()->updateQuery();
}

/**
* @inheritDoc
*/
public function getDeleteBuilder(): DeleteQuery
{
return $this->getDecoratedConnection()->deleteQuery();
}

/**
* Executes a query and returns PDOStatement.
*
Expand Down Expand Up @@ -294,7 +330,7 @@

foreach ($row as $column => $value) {
if (is_bool($value)) {
$row[$column] = $this->castToBool($value);

Check warning on line 333 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L333

Added line #L333 was not covered by tests
}
}

Expand Down Expand Up @@ -333,9 +369,9 @@
* @param string $value The string to quote
* @return string
*/
protected function quoteString(string $value): string

Check warning on line 372 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L372

Added line #L372 was not covered by tests
{
return $this->getConnection()->quote($value);

Check warning on line 374 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L374

Added line #L374 was not covered by tests
}

/**
Expand Down Expand Up @@ -371,7 +407,7 @@
foreach ($rows as $row) {
foreach ($row as $v) {
if (is_bool($v)) {
$vals[] = $this->castToBool($v);

Check warning on line 410 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L410

Added line #L410 was not covered by tests
} else {
$vals[] = $v;
}
Expand All @@ -385,11 +421,11 @@
/**
* @inheritDoc
*/
public function getVersions(): array

Check warning on line 424 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L424

Added line #L424 was not covered by tests
{
$rows = $this->getVersionLog();

Check warning on line 426 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L426

Added line #L426 was not covered by tests

return array_keys($rows);

Check warning on line 428 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L428

Added line #L428 was not covered by tests
}

/**
Expand Down Expand Up @@ -418,7 +454,7 @@
$rows = $this->fetchAll(sprintf('SELECT * FROM %s ORDER BY %s', $this->quoteTableName($this->getSchemaTableName()), $orderBy));
} catch (PDOException $e) {
if (!$this->isDryRunEnabled()) {
throw $e;

Check warning on line 457 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L457

Added line #L457 was not covered by tests
}
$rows = [];
}
Expand All @@ -433,96 +469,96 @@
/**
* @inheritDoc
*/
public function migrated(MigrationInterface $migration, string $direction, string $startTime, string $endTime): AdapterInterface

Check warning on line 472 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L472

Added line #L472 was not covered by tests
{
if (strcasecmp($direction, MigrationInterface::UP) === 0) {

Check warning on line 474 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L474

Added line #L474 was not covered by tests
// up
$sql = sprintf(
"INSERT INTO %s (%s, %s, %s, %s, %s) VALUES ('%s', '%s', '%s', '%s', %s);",
$this->quoteTableName($this->getSchemaTableName()),
$this->quoteColumnName('version'),
$this->quoteColumnName('migration_name'),
$this->quoteColumnName('start_time'),
$this->quoteColumnName('end_time'),
$this->quoteColumnName('breakpoint'),
$migration->getVersion(),
substr($migration->getName(), 0, 100),
$startTime,
$endTime,
$this->castToBool(false)
);

Check warning on line 489 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L476-L489

Added lines #L476 - L489 were not covered by tests

$this->execute($sql);

Check warning on line 491 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L491

Added line #L491 was not covered by tests
} else {
// down
$sql = sprintf(
"DELETE FROM %s WHERE %s = '%s'",
$this->quoteTableName($this->getSchemaTableName()),
$this->quoteColumnName('version'),
$migration->getVersion()
);

Check warning on line 499 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L494-L499

Added lines #L494 - L499 were not covered by tests

$this->execute($sql);

Check warning on line 501 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L501

Added line #L501 was not covered by tests
}

return $this;

Check warning on line 504 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L504

Added line #L504 was not covered by tests
}

/**
* @inheritDoc
*/
public function toggleBreakpoint(MigrationInterface $migration): AdapterInterface

Check warning on line 510 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L510

Added line #L510 was not covered by tests
{
$this->query(
sprintf(
'UPDATE %1$s SET %2$s = CASE %2$s WHEN %3$s THEN %4$s ELSE %3$s END, %7$s = %7$s WHERE %5$s = \'%6$s\';',
$this->quoteTableName($this->getSchemaTableName()),
$this->quoteColumnName('breakpoint'),
$this->castToBool(true),
$this->castToBool(false),
$this->quoteColumnName('version'),
$migration->getVersion(),
$this->quoteColumnName('start_time')
)
);

Check warning on line 523 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L512-L523

Added lines #L512 - L523 were not covered by tests

return $this;

Check warning on line 525 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L525

Added line #L525 was not covered by tests
}

/**
* @inheritDoc
*/
public function resetAllBreakpoints(): int

Check warning on line 531 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L531

Added line #L531 was not covered by tests
{
return $this->execute(
sprintf(
'UPDATE %1$s SET %2$s = %3$s, %4$s = %4$s WHERE %2$s <> %3$s;',
$this->quoteTableName($this->getSchemaTableName()),
$this->quoteColumnName('breakpoint'),
$this->castToBool(false),
$this->quoteColumnName('start_time')
)
);

Check warning on line 541 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L533-L541

Added lines #L533 - L541 were not covered by tests
}

/**
* @inheritDoc
*/
public function setBreakpoint(MigrationInterface $migration): AdapterInterface

Check warning on line 547 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L547

Added line #L547 was not covered by tests
{
$this->markBreakpoint($migration, true);

Check warning on line 549 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L549

Added line #L549 was not covered by tests

return $this;

Check warning on line 551 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L551

Added line #L551 was not covered by tests
}

/**
* @inheritDoc
*/
public function unsetBreakpoint(MigrationInterface $migration): AdapterInterface

Check warning on line 557 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L557

Added line #L557 was not covered by tests
{
$this->markBreakpoint($migration, false);

Check warning on line 559 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L559

Added line #L559 was not covered by tests

return $this;

Check warning on line 561 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L561

Added line #L561 was not covered by tests
}

/**
Expand All @@ -532,21 +568,21 @@
* @param bool $state The required state of the breakpoint
* @return \Migrations\Db\Adapter\AdapterInterface
*/
protected function markBreakpoint(MigrationInterface $migration, bool $state): AdapterInterface

Check warning on line 571 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L571

Added line #L571 was not covered by tests
{
$this->query(
sprintf(
'UPDATE %1$s SET %2$s = %3$s, %4$s = %4$s WHERE %5$s = \'%6$s\';',
$this->quoteTableName($this->getSchemaTableName()),
$this->quoteColumnName('breakpoint'),
$this->castToBool($state),
$this->quoteColumnName('start_time'),
$this->quoteColumnName('version'),
$migration->getVersion()
)
);

Check warning on line 583 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L573-L583

Added lines #L573 - L583 were not covered by tests

return $this;

Check warning on line 585 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L585

Added line #L585 was not covered by tests
}

/**
Expand All @@ -555,9 +591,9 @@
* @throws \BadMethodCallException
* @return void
*/
public function createSchema(string $schemaName = 'public'): void

Check warning on line 594 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L594

Added line #L594 was not covered by tests
{
throw new BadMethodCallException('Creating a schema is not supported');

Check warning on line 596 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L596

Added line #L596 was not covered by tests
}

/**
Expand All @@ -566,9 +602,9 @@
* @throws \BadMethodCallException
* @return void
*/
public function dropSchema(string $schemaName): void

Check warning on line 605 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L605

Added line #L605 was not covered by tests
{
throw new BadMethodCallException('Dropping a schema is not supported');

Check warning on line 607 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L607

Added line #L607 was not covered by tests
}

/**
Expand Down Expand Up @@ -642,7 +678,7 @@
} elseif (is_bool($default)) {
$default = $this->castToBool($default);
} elseif ($default !== null && $columnType === static::PHINX_TYPE_BOOLEAN) {
$default = $this->castToBool((bool)$default);

Check warning on line 681 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L681

Added line #L681 was not covered by tests
}

return isset($default) ? " DEFAULT $default" : '';
Expand All @@ -664,10 +700,10 @@
/**
* @inheritDoc
*/
public function addColumn(Table $table, Column $column): void

Check warning on line 703 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L703

Added line #L703 was not covered by tests
{
$instructions = $this->getAddColumnInstructions($table, $column);
$this->executeAlterSteps($table->getName(), $instructions);

Check warning on line 706 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L705-L706

Added lines #L705 - L706 were not covered by tests
}

/**
Expand Down Expand Up @@ -701,10 +737,10 @@
/**
* @inheritdoc
*/
public function changeColumn(string $tableName, string $columnName, Column $newColumn): void

Check warning on line 740 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L740

Added line #L740 was not covered by tests
{
$instructions = $this->getChangeColumnInstructions($tableName, $columnName, $newColumn);
$this->executeAlterSteps($tableName, $instructions);

Check warning on line 743 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L742-L743

Added lines #L742 - L743 were not covered by tests
}

/**
Expand Down Expand Up @@ -738,10 +774,10 @@
/**
* @inheritdoc
*/
public function addIndex(Table $table, Index $index): void

Check warning on line 777 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L777

Added line #L777 was not covered by tests
{
$instructions = $this->getAddIndexInstructions($table, $index);
$this->executeAlterSteps($table->getName(), $instructions);

Check warning on line 780 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L779-L780

Added lines #L779 - L780 were not covered by tests
}

/**
Expand Down Expand Up @@ -877,10 +913,10 @@
/**
* @inheritdoc
*/
public function changePrimaryKey(Table $table, $newColumns): void

Check warning on line 916 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L916

Added line #L916 was not covered by tests
{
$instructions = $this->getChangePrimaryKeyInstructions($table, $newColumns);
$this->executeAlterSteps($table->getName(), $instructions);

Check warning on line 919 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L918-L919

Added lines #L918 - L919 were not covered by tests
}

/**
Expand All @@ -895,10 +931,10 @@
/**
* @inheritdoc
*/
public function changeComment(Table $table, $newComment): void

Check warning on line 934 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L934

Added line #L934 was not covered by tests
{
$instructions = $this->getChangeCommentInstructions($table, $newComment);
$this->executeAlterSteps($table->getName(), $instructions);

Check warning on line 937 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L936-L937

Added lines #L936 - L937 were not covered by tests
}

/**
Expand Down Expand Up @@ -956,11 +992,11 @@

case $action instanceof DropForeignKey && $action->getForeignKey()->getConstraint():
/** @var \Migrations\Db\Action\DropForeignKey $action */
$instructions->merge($this->getDropForeignKeyInstructions(
$table->getName(),
(string)$action->getForeignKey()->getConstraint()
));
break;

Check warning on line 999 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L995-L999

Added lines #L995 - L999 were not covered by tests

case $action instanceof DropIndex && $action->getIndex()->getName() !== null:
/** @var \Migrations\Db\Action\DropIndex $action */
Expand All @@ -980,10 +1016,10 @@

case $action instanceof DropTable:
/** @var \Migrations\Db\Action\DropTable $action */
$instructions->merge($this->getDropTableInstructions(
$table->getName()
));
break;

Check warning on line 1022 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L1019-L1022

Added lines #L1019 - L1022 were not covered by tests

case $action instanceof RemoveColumn:
/** @var \Migrations\Db\Action\RemoveColumn $action */
Expand Down Expand Up @@ -1027,9 +1063,9 @@
break;

default:
throw new InvalidArgumentException(
sprintf("Don't know how to execute action: '%s'", get_class($action))
);

Check warning on line 1068 in src/Db/Adapter/PdoAdapter.php

View check run for this annotation

Codecov / codecov/patch

src/Db/Adapter/PdoAdapter.php#L1066-L1068

Added lines #L1066 - L1068 were not covered by tests
}
}

Expand Down
Loading
Loading