variant options wip

This commit is contained in:
2025-07-05 20:08:56 -07:00
parent c9d34f7115
commit 5adc791c20
16 changed files with 462 additions and 1 deletions

View File

@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
use Migrations\BaseMigration;
class CreateProductCategoryVariantOptions 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_category_variant_options', ['id' => false, 'primary_key' => ['id']]);
$table->addColumn('id', 'uuid', [
'default' => null,
'null' => false,
]);
$table->addColumn('product_category_variant_id', 'uuid', [
'default' => null,
'null' => false,
]);
$table->addColumn('variant_value', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('variant_label', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('created', 'datetime', [
'default' => null,
'null' => false,
]);
$table->addColumn('modified', 'datetime', [
'default' => null,
'null' => false,
]);
$table->addColumn('deleted', 'datetime', [
'default' => null,
'null' => true,
]);
$table->addColumn('enabled', 'boolean', [
'default' => true,
'null' => false,
]);
$table->addForeignKey('product_category_variant_id', 'product_category_variants');
$table->create();
}
}