fix: edit table and migrations

This commit is contained in:
2026-04-17 13:56:26 +02:00
59 changed files with 8918 additions and 88 deletions

View File

@@ -56,7 +56,8 @@ INSERT IGNORE INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `act
', 1),
(17, 'customer-management-profile', ':user_id/profile', '/components/customer-management/Profile.vue', '{
"guest":true,
"name": "Profile"
"name": "Profile",
"layout": "management"
}
', 1),
(18, 'admin-users-search', 'users-search', '/components/admin/UsersSearch.vue', '{
@@ -334,9 +335,27 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a
}
}', 1, 1);
CREATE TABLE IF NOT EXISTS b2b_customer_management_menu (
menu_id INT AUTO_INCREMENT NOT NULL,
label LONGTEXT NOT NULL DEFAULT '{}',
parent_id INT NULL DEFAULT NULL,
params LONGTEXT NOT NULL DEFAULT '{}',
active TINYINT NOT NULL DEFAULT 1,
position INT NOT NULL DEFAULT 1,
PRIMARY KEY (menu_id),
CONSTRAINT FK_b2b_customer_management_menu_parent_id FOREIGN KEY (parent_id)
REFERENCES b2b_customer_management_menu (menu_id)
ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX FK_b2b_customer_management_menu_parent_id_idx (parent_id ASC)
) ENGINE = InnoDB;
INSERT IGNORE INTO `b2b_customer_management_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES
(1, JSON_COMPACT('{"name":"root","trans":{"pl":{"label":"Menu główne"},"en":{"label":"Main Menu"},"de":{"label":"Hauptmenü"}}}'),NULL,JSON_COMPACT('{}'),1,1),
(3, JSON_COMPACT('{"name":"admin-products","trans":{"pl":{"label":"admin-products"},"en":{"label":"admin-products"},"de":{"label":"admin-products"}}}'),1,JSON_COMPACT('{}'),1,1),
(9, JSON_COMPACT('{"name":"carts","trans":{"pl":{"label":"Koszyki"},"en":{"label":"Carts"},"de":{"label":"Warenkörbe"}}}'),3,JSON_COMPACT('{"route": {"name": "home", "params":{"locale": ""}}}'),1,1);
-- +goose Down
DROP TABLE IF EXISTS b2b_routes;
DROP TABLE IF EXISTS b2b_top_menu;
DROP TABLE IF EXISTS b2b_customer_management_menu;
DROP FUNCTION IF EXISTS `slugify_eu`;