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

This commit is contained in:
2026-03-26 11:46:37 +01:00
349 changed files with 8306 additions and 254 deletions

View File

@@ -0,0 +1,34 @@
-- +goose Up
-- -- create routes table
-- CREATE TABLE IF NOT EXISTS b2b_routes (
-- id INT AUTO_INCREMENT PRIMARY KEY,
-- name VARCHAR(255) NOT NULL UNIQUE,
-- path VARCHAR(255) NULL,
-- component VARCHAR(255) NOT NULL COMMENT 'path to component file',
-- layout VARCHAR(50) DEFAULT 'default' COMMENT "'default' | 'empty'",
-- meta JSON DEFAULT '{}',
-- is_active BOOLEAN DEFAULT TRUE,
-- sort_order INT DEFAULT 0,
-- parent_id INT NULL,
-- CONSTRAINT fk_parent
-- FOREIGN KEY (parent_id)
-- REFERENCES b2b_routes(id)
-- ON DELETE SET NULL
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- INSERT IGNORE INTO b2b_routes
-- (name, path, component, layout, meta, is_active, sort_order, parent_id)
-- VALUES
-- ('root', '', '', 'default', '{"trans": "route.root"}', 0, 0, 0),
-- ('home', '', '@/views/HomeView.vue', 'default', '{"trans": "route.home"}', 1, 0, 0),
-- ('login', 'login', '@/views/LoginView.vue', 'empty', '{"guest":true}', 1, 2, NULL),
-- ('register', 'register', '@/views/RegisterView.vue', 'empty', '{"guest":true}', 1, 3, NULL),
-- ('password-recovery', 'password-recovery', '@/views/PasswordRecoveryView.vue', 'empty', '{"guest":true}', 1, 4, NULL),
-- ('reset-password', 'reset-password', '@/views/ResetPasswordView.vue', 'empty', '{"guest":true}', 1, 5, NULL),
-- ('verify-email', 'verify-email', '@/views/VerifyEmailView.vue', 'empty', '{"guest":true}', 1, 6, NULL);
-- +goose Down
-- DROP TABLE IF EXISTS b2b_routes;

View File

@@ -126,13 +126,13 @@ CREATE INDEX IF NOT EXISTS idx_refresh_tokens_customer_id ON b2b_refresh_tokens
CREATE TABLE IF NOT EXISTS b2b_countries (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(128) NOT NULL,
currency INT UNSIGNED NOT NULL,
currency_id INT UNSIGNED NOT NULL,
flag VARCHAR(16) NOT NULL,
CONSTRAINT fk_countries_currency FOREIGN KEY (currency) REFERENCES ps_currency(id_currency) ON DELETE RESTRICT ON UPDATE RESTRICT
CONSTRAINT fk_countries_currency FOREIGN KEY (currency_id) REFERENCES ps_currency(id_currency) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT IGNORE INTO b2b_countries
(id, name, currency, flag)
(id, name, currency_id, flag)
VALUES
(1, 'Polska', 1, '🇵🇱'),
(2, 'England', 2, '🇬🇧'),