26 lines
611 B
PHP
26 lines
611 B
PHP
|
|
<?php
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use Migrations\BaseMigration;
|
||
|
|
|
||
|
|
class AllowProductIdToBeNullInProductPhotos extends BaseMigration
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Change Method.
|
||
|
|
*
|
||
|
|
* More information on this method is available here:
|
||
|
|
* https://book.cakephp.org/migrations/4/en/migrations.html#the-change-method
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function change(): void
|
||
|
|
{
|
||
|
|
$table = $this->table('product_photos');
|
||
|
|
$table->changeColumn('product_id', 'uuid', [
|
||
|
|
'default' => null,
|
||
|
|
'limit' => 11,
|
||
|
|
'null' => true,
|
||
|
|
]);
|
||
|
|
$table->update();
|
||
|
|
}
|
||
|
|
}
|