test additions variants table

This commit is contained in:
2025-06-29 22:25:38 -07:00
parent 5bb1110e7f
commit 5cba7de890
9 changed files with 414 additions and 23 deletions

View File

@@ -32,7 +32,7 @@ class CreateProductCategoryVariants extends AbstractMigration
'default' => null,
'null' => true,
]);
$table->addColumn('attribute_type_id', 'integer', [
$table->addColumn('variant_type_id', 'integer', [
'default' => null,
'limit' => 11,
'null' => false,
@@ -44,20 +44,21 @@ class CreateProductCategoryVariants extends AbstractMigration
$table->addIndex([
'product_category_id',
], [
'name' => 'BY_PRODUCT_CATEGORY_ID',
'name' => 'VARIANTS_BY_PRODUCT_CATEGORY_ID',
'unique' => false,
]);
$table->addIndex([
'product_id',
], [
'name' => 'BY_PRODUCT_ID',
'name' => 'VARIANTS_BY_PRODUCT_ID',
'unique' => false,
]);
$table->addIndex([
'name',
'product_category_id',
'product_id',
], [
'name' => 'BY_NAME_AND_PRODUCT_CATEGORY_ID_UNIQUE',
'name' => 'VARIANTS_BY_NAME_AND_PRODUCT_CATEGORY_ID_AND_PRODUCT_ID_UNIQUE',
'unique' => true,
]);
$table->create();