not sure if that index should be kept or if leave up to user to use soft delete - soft delete can break if readd product with same name/category after deleting
CI / testsuite (mysql, 8.2, ) (push) Failing after 6m11s Details
CI / testsuite (mysql, 8.4, ) (push) Successful in 10m22s Details
CI / testsuite (sqlite, 8.2, prefer-lowest) (push) Failing after 5m57s Details
CI / Coding Standard & Static Analysis (push) Failing after 5m39s Details

This commit is contained in:
Brandon Shipley 2025-10-05 17:42:07 -07:00
parent 5a855374f9
commit 81a9f827db
Signed by: bmfs
GPG Key ID: 14E38571D8BB0DE4
2 changed files with 8 additions and 8 deletions

View File

@ -35,13 +35,13 @@ class CreateProducts extends AbstractMigration
]);
$table->addIndex('product_category_id');
$table->addIndex('product_type_id');
$table->addIndex([
'product_category_id',
'name',
], [
'name' => 'BY_NAME_AND_CATEGORY_ID',
'unique' => true,
]);
// $table->addIndex([
// 'product_category_id',
// 'name',
// ], [
// 'name' => 'BY_NAME_AND_CATEGORY_ID',
// 'unique' => true,
// ]);
$table->create();
}
}

View File

@ -41,6 +41,6 @@ class Product extends Entity
// entities
'product_category' => false,
'product_attributes' => true,
'product_category_variants' => false,
'product_category_variants' => true,
];
}