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
This commit is contained in:
parent
5a855374f9
commit
81a9f827db
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,6 @@ class Product extends Entity
|
|||
// entities
|
||||
'product_category' => false,
|
||||
'product_attributes' => true,
|
||||
'product_category_variants' => false,
|
||||
'product_category_variants' => true,
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue