default product type id on categories table

This commit is contained in:
2025-07-05 23:18:54 -07:00
parent 59a38758e9
commit 9d777f12b2
7 changed files with 68 additions and 8 deletions

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
use Migrations\BaseMigration;
class AddDefaultProductTypeIdToProductCategories 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_categories');
$table->addColumn('default_product_type_id', 'integer', [
'default' => null,
'limit' => 11,
'null' => true,
]);
$table->update();
}
}