Merge branch 'product-procedures' of ssh://git.ma-al.com:8822/goc_daniel/b2b into update_categories

This commit is contained in:
Daniel Goc
2026-04-13 14:48:28 +02:00
44 changed files with 1631 additions and 539 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 //