variant options coming along - add test passing

This commit is contained in:
2025-07-05 20:48:40 -07:00
parent 5adc791c20
commit 59a38758e9
11 changed files with 110 additions and 24 deletions

View File

@@ -48,14 +48,14 @@ class CreateProductCategoryVariants extends AbstractMigration
'name' => 'VARIANTS_BY_PRODUCT_ID',
'unique' => false,
]);
$table->addIndex([
'name',
'product_category_id',
'product_id',
], [
'name' => 'VARIANTS_BY_NAME_AND_PRODUCT_CATEGORY_ID_AND_PRODUCT_ID_UNIQUE',
'unique' => true,
]);
// $table->addIndex([
// 'name',
// 'product_category_id',
// 'product_id',
// ], [
// 'name' => 'VARIANTS_BY_NAME_AND_PRODUCT_CATEGORY_ID_AND_PRODUCT_ID_UNIQUE',
// 'unique' => true,
// ]);
$table->create();
}
}

View File

@@ -49,8 +49,7 @@ class CreateProductCategoryVariantOptions extends BaseMigration
'default' => true,
'null' => false,
]);
$table->addForeignKey('product_category_variant_id', 'product_category_variants');
// $table->addForeignKey('product_category_variant_id', 'product_category_variants'); // @TODO why cant this be included??? breaks tests on tearDown
$table->create();
}