category photos should be working

This commit is contained in:
2025-10-12 01:04:36 -07:00
parent 66db31c7ad
commit 30aad1dea4
11 changed files with 105 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
use Migrations\BaseMigration;
class AddProductCategoryIdToProductPhotos 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->addColumn('product_category_id', 'uuid', [
'default' => null,
'null' => true,
]);
$table->addColumn('primary_category_photo', 'boolean', [
'default' => false,
'null' => false,
]);
$table->update();
}
}