File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2842,20 +2842,24 @@ public function testChangeColumnWithAlgorithm(): void
28422842 {
28432843 $ this ->adapter ->connect ();
28442844
2845+ if (version_compare ($ this ->adapter ->getAttribute (PDO ::ATTR_SERVER_VERSION ), '8.0.0 ' ) === -1 ) {
2846+ $ this ->markTestSkipped ('Cannot test inplace algorithm on mysql versions less than 8 ' );
2847+ }
2848+
28452849 $ table = new Table ('items ' , [], $ this ->adapter );
2846- $ table ->addColumn ('description ' , 'string ' , ['limit ' => 10 ])
2850+ $ table ->addColumn ('description ' , 'string ' , ['limit ' => 100 ])
28472851 ->create ();
28482852
28492853 $ table ->changeColumn ('description ' , 'string ' , [
2850- 'limit ' => 20 ,
2854+ 'limit ' => 255 ,
28512855 'algorithm ' => MysqlAdapter::ALGORITHM_INPLACE ,
28522856 'lock ' => MysqlAdapter::LOCK_SHARED ,
28532857 ])->update ();
28542858
28552859 $ columns = $ this ->adapter ->getColumns ('items ' );
28562860 foreach ($ columns as $ column ) {
28572861 if ($ column ->getName () === 'description ' ) {
2858- $ this ->assertEquals (200 , $ column ->getLimit ());
2862+ $ this ->assertEquals (255 , $ column ->getLimit ());
28592863 }
28602864 }
28612865 }
You can’t perform that action at this time.
0 commit comments