chore: address pull request review issues
This commit is contained in:
@@ -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 //
|
||||
|
||||
|
||||
@@ -34,13 +34,16 @@ INSERT INTO `b2b_permissions` (`id`, `name`) VALUES ('1', 'user.read.any');
|
||||
INSERT INTO `b2b_permissions` (`id`, `name`) VALUES ('2', 'user.write.any');
|
||||
INSERT INTO `b2b_permissions` (`id`, `name`) VALUES ('3', 'user.delete.any');
|
||||
INSERT INTO `b2b_permissions` (`id`, `name`) VALUES ('4', 'currency.write');
|
||||
INSERT INTO `b2b_permissions` (`id`, `name`) VALUES ('5', 'specific_price.manage');
|
||||
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('2', '1');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('2', '2');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('2', '3');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('2', '4');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('2', '5');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('3', '1');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('3', '2');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('3', '3');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('3', '4');
|
||||
INSERT INTO `b2b_role_permissions` (`role_id`, `permission_id`) VALUES ('3', '5');
|
||||
-- +goose Down
|
||||
@@ -1,9 +0,0 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
SELECT 'up SQL query';
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
SELECT 'down SQL query';
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user