chore: address pull request review issues

This commit is contained in:
2026-04-13 14:21:22 +02:00
parent 2e61cde742
commit 38cb07f3d4
12 changed files with 74 additions and 184 deletions

View File

@@ -238,7 +238,6 @@ CREATE TABLE b2b_specific_price (
created_at DATETIME NULL,
updated_at DATETIME NULL,
deleted_at DATETIME NULL,
scope ENUM('shop', 'category', 'product') NOT NULL,
valid_from DATETIME NULL,
valid_till DATETIME NULL,
has_expiration_date BOOLEAN DEFAULT FALSE,
@@ -249,11 +248,9 @@ CREATE TABLE b2b_specific_price (
from_quantity INT UNSIGNED DEFAULT 1,
is_active BOOLEAN DEFAULT TRUE
) ENGINE = InnoDB;
CREATE INDEX idx_b2b_scope ON b2b_specific_price(scope);
CREATE INDEX idx_b2b_active_dates ON b2b_specific_price(is_active, valid_from, valid_till);
CREATE INDEX idx_b2b_lookup
ON b2b_specific_price (
scope,
is_active,
from_quantity
);
@@ -307,11 +304,11 @@ ON b2b_specific_price_category (id_category);
CREATE INDEX idx_b2b_product_attribute_rel
ON b2b_specific_price_product_attribute (id_product_attribute);
CREATE INDEX idx_bsp_customer
ON b2b_specific_price_customer (b2b_specific_price_id, b2b_id_customer);
CREATE INDEX idx_bsp_customer_rel
ON b2b_specific_price_customer (b2b_id_customer);
CREATE INDEX idx_bsp_country
ON b2b_specific_price_country (b2b_specific_price_id, b2b_id_country);
CREATE INDEX idx_bsp_country_rel
ON b2b_specific_price_country (b2b_id_country);
DELIMITER //