Skip to content

Commit 57ed5d4

Browse files
committed
[2323] add mysql8 check
1 parent 3ea9ee6 commit 57ed5d4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/Phinx/Db/Adapter/MysqlAdapterTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,6 +2802,10 @@ public function testAddColumnWithAlgorithmInstant(): void
28022802
{
28032803
$this->adapter->connect();
28042804

2805+
if (!$this->usingMysql8()) {
2806+
$this->markTestSkipped('Cannot test Instant algorithm on mysql versions less than 8');
2807+
}
2808+
28052809
$table = new Table('users', [], $this->adapter);
28062810
$table->addColumn('email', 'string')
28072811
->create();
@@ -2843,15 +2847,15 @@ public function testChangeColumnWithAlgorithm(): void
28432847
->create();
28442848

28452849
$table->changeColumn('description', 'string', [
2846-
'limit' => 255,
2850+
'limit' => 200,
28472851
'algorithm' => MysqlAdapter::ALGORITHM_INPLACE,
28482852
'lock' => MysqlAdapter::LOCK_SHARED,
28492853
])->update();
28502854

28512855
$columns = $this->adapter->getColumns('items');
28522856
foreach ($columns as $column) {
28532857
if ($column->getName() === 'description') {
2854-
$this->assertEquals(255, $column->getLimit());
2858+
$this->assertEquals(200, $column->getLimit());
28552859
}
28562860
}
28572861
}
@@ -2860,6 +2864,10 @@ public function testBatchedOperationsWithSameAlgorithm(): void
28602864
{
28612865
$this->adapter->connect();
28622866

2867+
if (!$this->usingMysql8()) {
2868+
$this->markTestSkipped('Cannot test Instant algorithm on mysql versions less than 8');
2869+
}
2870+
28632871
$table = new Table('batch_test', [], $this->adapter);
28642872
$table->addColumn('col1', 'string')
28652873
->create();

0 commit comments

Comments
 (0)