product id back on product category variants table...dumb

This commit is contained in:
2025-09-22 21:51:52 -07:00
parent 2d405d542b
commit 5b38de39fc
4 changed files with 22 additions and 3 deletions

View File

@@ -28,6 +28,10 @@ class CreateProductCategoryVariants extends AbstractMigration
'default' => null,
'null' => true,
]);
$table->addColumn('product_id', 'uuid', [
'default' => null,
'null' => true,
]);
$table->addColumn('enabled', 'boolean', [
'default' => null,
'null' => false,
@@ -38,12 +42,18 @@ class CreateProductCategoryVariants extends AbstractMigration
'name' => 'VARIANTS_BY_PRODUCT_CATEGORY_ID',
'unique' => false,
]);
$table->addIndex([
'product_id',
], [
'name' => 'VARIANTS_BY_PRODUCT_ID',
'unique' => false,
]);
// $table->addIndex([
// 'name',
// 'product_category_id',
// 'product_id',
// ], [
// 'name' => 'VARIANTS_BY_NAME_AND_PRODUCT_CATEGORY_ID_UNIQUE',
// 'name' => 'VARIANTS_BY_NAME_AND_PRODUCT_CATEGORY_ID_AND_PRODUCT_ID_UNIQUE',
// 'unique' => true,
// ]);
$table->create();