fix: migrations

This commit is contained in:
2026-03-11 13:34:52 +01:00
parent 5921987ad7
commit b610e46bd5
10 changed files with 557 additions and 697 deletions

17
.env
View File

@@ -1,24 +1,23 @@
# Server Configuration
SERVER_PORT=3000 SERVER_PORT=3000
SERVER_HOST=0.0.0.0 SERVER_HOST=0.0.0.0
# Database Configuration # Database Configuration
DB_HOST=localhost DB_HOST=localhost
DB_PORT=5432 DB_PORT=3306
DB_USER=gitea DB_USER=root
DB_PASSWORD=gitea DB_PASSWORD=Maal12345678
DB_NAME=gitea DB_NAME=presta
PROJECT_NAME=gitea-ext PROJECT_NAME=nalu_b2b
DB_SERVICE_NAME=postgres DB_SERVICE_NAME=nalu_b2b
DB_SSLMODE=disable DB_SSLMODE=disable
# App COnfig # App COnfig
APP_NAME="User Management System" APP_NAME="B2b Management System"
APP_VERSION=2.1.0 APP_VERSION=2.1.0
APP_ENVIRONMENT=development APP_ENVIRONMENT=development
# JWT Configuration # JWT Configuration
AUTH_JWT_SECRET=511900e67f2db873e72b0b24e51352227b067fc03c5d7b3d321e3baba317c83a AUTH_JWT_SECRET=5c020e6ed3d8d6e67e5804d67c83c4bd5ae474df749af6d63d8f20e7e2ba29b3
AUTH_JWT_EXPIRATION=86400 AUTH_JWT_EXPIRATION=86400
AUTH_REFRESH_EXPIRATION=604800 AUTH_REFRESH_EXPIRATION=604800

View File

@@ -3,40 +3,50 @@ version: "3"
dotenv: [".env"] dotenv: [".env"]
vars: vars:
PROJECT: timetracker PROJECT: nalu_b2b
BUILD_DIR: ./bin BUILD_DIR: ./bin
REMOTE_USER: root REMOTE_USER: root
REMOTE_HOST: 192.168.220.30 REMOTE_HOST: dc02-de
EMAIL_SMTP_PORT: 1025 EMAIL_SMTP_PORT: 1025
EMAIL_SMTP_HOST: localhost EMAIL_SMTP_HOST: localhost
GITEA_SERVICE: gitea_postgres_db
GITEA_DB: gitea LOCAL_DB_SERVICE: db
GITEA_USER: gitea LOCAL_DB_USER: nalu
LOCAL_DB_NAME: nalu
LOCAL_DB_PASSWORD: Maal12345678
DUMP_FILE_NAME: DUMP_FILE_NAME:
sh: echo gitea_$(date +%Y_%m_%d__%H_%M_%S).sql sh: echo nalu_$(date +%Y_%m_%d__%H_%M_%S).sql
GITEA_REMOTE_SERVICE: "gitea_postgres_db" REMOTE_DB_SERVICE: "www_naluconcept_com_nalu_db"
GITEA_REMOTE_DB_NAME: "gitea" REMOTE_DB_NAME: "presta"
GITEA_REMOTE_DB_USER: "gitea" REMOTE_DB_USER: "presta"
GITEA_REMOTE_DB_PASS: "gitea" REMOTE_DB_PASS: "presta"
DOCKER_CONFIG: | DOCKER_CONFIG: |
services: services:
{{.DB_SERVICE_NAME}}: {{.LOCAL_DB_SERVICE}}:
image: postgres:alpine image: mariadb:latest
container_name: {{.DB_SERVICE_NAME}} container_name: {{.LOCAL_DB_SERVICE}}
environment: command:
POSTGRES_USER: {{.DB_USER}} - --innodb_buffer_pool_size=134217728
POSTGRES_PASSWORD: {{.DB_PASSWORD}} - --key_buffer_size=33554432
POSTGRES_DB: {{.DB_NAME}} - --query_cache_type=1
- --query_cache_size=67108864
- --query-cache-strip-comments=1
- --max-connections=256
- --event_scheduler=1
- --log-bin=binlog
- --log_bin_trust_function_creators=1
ports: ports:
- "{{.DB_PORT}}:{{.DB_PORT}}" - "3306:3306"
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - db_data:/var/lib/mysql
healthcheck: environment:
test: ["CMD-SHELL", "pg_isready -U postgres"] MYSQL_ROOT_PASSWORD: {{.LOCAL_DB_PASSWORD}}
interval: 10s MYSQL_DATABASE: {{.LOCAL_DB_NAME}}
timeout: 5s MARIADB_USER: {{.LOCAL_DB_USER}}
retries: 5 MARIADB_PASSWORD: {{.LOCAL_DB_PASSWORD}}
TZ: CET-1CES
restart: always
pdf: pdf:
image: registry.ma-al.com/print-rs:latest image: registry.ma-al.com/print-rs:latest
command: start_server command: start_server
@@ -65,7 +75,7 @@ vars:
MP_VERBOSE: true MP_VERBOSE: true
volumes: volumes:
postgres_data: db_data:
mailpit_data: mailpit_data:
@@ -74,7 +84,7 @@ includes:
dev: ./taskfiles/dev.yml dev: ./taskfiles/dev.yml
build: ./taskfiles/build.yml build: ./taskfiles/build.yml
db: ./taskfiles/db.yml db: ./taskfiles/db.yml
gitea: ./taskfiles/gitea.yml nalu: ./taskfiles/nalu_db.yml
i18n: ./taskfiles/i18n.yml i18n: ./taskfiles/i18n.yml
tpl: ./taskfiles/templates.yml tpl: ./taskfiles/templates.yml

View File

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

View File

@@ -1,143 +1,127 @@
-- +goose Up -- +goose Up
CREATE TABLE IF NOT EXISTS "public"."language" ( CREATE TABLE IF NOT EXISTS b2b_language (
"id" SERIAL, id INT AUTO_INCREMENT PRIMARY KEY,
"created_at" TIMESTAMP WITH TIME ZONE NOT NULL, created_at DATETIME(6) NOT NULL,
"updated_at" TIMESTAMP WITH TIME ZONE NULL, updated_at DATETIME(6) NULL,
"deleted_at" TIMESTAMP WITH TIME ZONE NULL, deleted_at DATETIME(6) NULL,
"name" VARCHAR(128) NOT NULL, name VARCHAR(128) NOT NULL,
"iso_code" VARCHAR(2) NOT NULL, iso_code VARCHAR(2) NOT NULL,
"lang_code" VARCHAR(5) NOT NULL, lang_code VARCHAR(5) NOT NULL,
"date_format" VARCHAR(32) NOT NULL, date_format VARCHAR(32) NOT NULL,
"date_format_short" VARCHAR(32) NOT NULL, date_format_short VARCHAR(32) NOT NULL,
"rtl" BOOLEAN NOT NULL DEFAULT false , rtl TINYINT(1) NOT NULL DEFAULT 0,
"is_default" BOOLEAN NOT NULL DEFAULT false , is_default TINYINT(1) NOT NULL DEFAULT 0,
"active" BOOLEAN NOT NULL DEFAULT true , active TINYINT(1) NOT NULL DEFAULT 1,
"flag" VARCHAR(16) NOT NULL, flag VARCHAR(16) NOT NULL
CONSTRAINT "language_pkey" PRIMARY KEY ("id") ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
);
CREATE INDEX IF NOT EXISTS "idx_language_deleted_at"
ON "public"."language" (
"deleted_at" ASC
);
INSERT INTO "public"."language" ("id", "created_at", "updated_at", "deleted_at", "name", "iso_code", "lang_code", "date_format", "date_format_short", "rtl", "is_default", "active", "flag") VALUES (1, '2022-09-16 17:10:02.837+00', '2026-03-02 21:24:36.77973+00', NULL, 'Polski', 'pl', 'pl', '__-__-____', '__-__', false, false, true, '🇵🇱') ON CONFLICT DO NOTHING; CREATE INDEX IF NOT EXISTS idx_language_deleted_at
INSERT INTO "public"."language" ("id", "created_at", "updated_at", "deleted_at", "name", "iso_code", "lang_code", "date_format", "date_format_short", "rtl", "is_default", "active", "flag") VALUES (2, '2022-09-16 17:10:02.852+00', '2026-03-02 21:24:36.77973+00', NULL, 'English', 'en', 'en', '__-__-____', '__-__', false, true, true, '🇬🇧') ON CONFLICT DO NOTHING; ON b2b_language (deleted_at);
INSERT INTO "public"."language" ("id", "created_at", "updated_at", "deleted_at", "name", "iso_code", "lang_code", "date_format", "date_format_short", "rtl", "is_default", "active", "flag") VALUES (3, '2022-09-16 17:10:02.865+00', '2026-03-02 21:24:36.77973+00', NULL, 'Čeština', 'cs', 'cs', '__-__-____', '__-__', false, false, true, '🇨🇿') ON CONFLICT DO NOTHING;
INSERT IGNORE INTO b2b_language
(id, created_at, updated_at, deleted_at, name, iso_code, lang_code, date_format, date_format_short, rtl, is_default, active, flag)
VALUES
(1, '2022-09-16 17:10:02.837', '2026-03-02 21:24:36.779730', NULL, 'Polski', 'pl', 'pl', '__-__-____', '__-__', 0, 0, 1, '🇵🇱'),
(2, '2022-09-16 17:10:02.852', '2026-03-02 21:24:36.779730', NULL, 'English', 'en', 'en', '__-__-____', '__-__', 0, 1, 1, '🇬🇧'),
(3, '2022-09-16 17:10:02.865', '2026-03-02 21:24:36.779730', NULL, 'Čeština', 'cs', 'cs', '__-__-____', '__-__', 0, 0, 1, '🇨🇿');
-- components CREATE TABLE IF NOT EXISTS b2b_components (
CREATE TABLE IF NOT EXISTS "public"."components" ( id INT AUTO_INCREMENT PRIMARY KEY,
"id" SERIAL, name VARCHAR(255) NOT NULL
"name" VARCHAR(255) NOT NULL, ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
CONSTRAINT "components_pkey" PRIMARY KEY ("id") CREATE UNIQUE INDEX IF NOT EXISTS uk_components_name ON b2b_components (name, id);
);
CREATE UNIQUE INDEX IF NOT EXISTS "uk_components_name"
ON "public"."components" (
"name" ASC,
"id" ASC
);
-- scopes -- scopes
CREATE TABLE IF NOT EXISTS "public"."scopes" ( CREATE TABLE IF NOT EXISTS b2b_scopes (
"id" SERIAL, id INT AUTO_INCREMENT PRIMARY KEY,
"name" VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL
CONSTRAINT "scopes_pkey" PRIMARY KEY ("id") ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
); CREATE UNIQUE INDEX IF NOT EXISTS uk_scopes_name ON b2b_scopes (name);
CREATE UNIQUE INDEX IF NOT EXISTS "uk_scopes_name"
ON "public"."scopes" (
"name" ASC
);
-- translations -- translations
CREATE TABLE IF NOT EXISTS "public"."translations" ( CREATE TABLE IF NOT EXISTS b2b_translations (
"lang_id" BIGINT NOT NULL, lang_id INT NOT NULL,
"scope_id" BIGINT NOT NULL, scope_id INT NOT NULL,
"component_id" BIGINT NOT NULL, component_id INT NOT NULL,
"key" VARCHAR(255) NOT NULL, `key` VARCHAR(255) NOT NULL,
"data" TEXT NULL, data TEXT NULL,
CONSTRAINT "translations_pkey" PRIMARY KEY ("lang_id", "scope_id", "component_id", "key"), PRIMARY KEY (lang_id, scope_id, component_id, `key`),
CONSTRAINT "fk_translations_language" FOREIGN KEY ("lang_id") REFERENCES "public"."language" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT fk_translations_language FOREIGN KEY (lang_id) REFERENCES b2b_language(id) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT "fk_translations_scope" FOREIGN KEY ("scope_id") REFERENCES "public"."scopes" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT, CONSTRAINT fk_translations_scope FOREIGN KEY (scope_id) REFERENCES b2b_scopes(id) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT "fk_translations_component" FOREIGN KEY ("component_id") REFERENCES "public"."components" ("id") ON DELETE RESTRICT ON UPDATE RESTRICT CONSTRAINT fk_translations_component FOREIGN KEY (component_id) REFERENCES b2b_components(id) ON DELETE RESTRICT ON UPDATE RESTRICT
); ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
-- customers -- customers
CREATE TABLE IF NOT EXISTS "public"."customers" ( CREATE TABLE IF NOT EXISTS b2b_customers (
"id" SERIAL, id INT AUTO_INCREMENT PRIMARY KEY,
"email" VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL,
"password" VARCHAR(255) NULL, password VARCHAR(255) NULL,
"first_name" VARCHAR(100) NULL, first_name VARCHAR(100) NULL,
"last_name" VARCHAR(100) NULL, last_name VARCHAR(100) NULL,
"role" VARCHAR(20) NULL DEFAULT 'user'::character varying , role VARCHAR(20) NULL DEFAULT 'user',
"provider" VARCHAR(20) NULL DEFAULT 'local'::character varying , provider VARCHAR(20) NULL DEFAULT 'local',
"provider_id" VARCHAR(255) NULL, provider_id VARCHAR(255) NULL,
"avatar_url" VARCHAR(500) NULL, avatar_url VARCHAR(500) NULL,
"is_active" BOOLEAN NULL DEFAULT true , is_active TINYINT(1) NULL DEFAULT 1,
"email_verified" BOOLEAN NULL DEFAULT false , email_verified TINYINT(1) NULL DEFAULT 0,
"email_verification_token" VARCHAR(255) NULL, email_verification_token VARCHAR(255) NULL,
"email_verification_expires" TIMESTAMP WITH TIME ZONE NULL, email_verification_expires DATETIME(6) NULL,
"password_reset_token" VARCHAR(255) NULL, password_reset_token VARCHAR(255) NULL,
"password_reset_expires" TIMESTAMP WITH TIME ZONE NULL, password_reset_expires DATETIME(6) NULL,
"last_password_reset_request" TIMESTAMP WITH TIME ZONE NULL, last_password_reset_request DATETIME(6) NULL,
"last_login_at" TIMESTAMP WITH TIME ZONE NULL, last_login_at DATETIME(6) NULL,
"lang" VARCHAR(10) NULL DEFAULT 'en'::character varying , lang VARCHAR(10) NULL DEFAULT 'en',
"created_at" TIMESTAMP WITH TIME ZONE NULL, created_at DATETIME(6) NULL,
"updated_at" TIMESTAMP WITH TIME ZONE NULL, updated_at DATETIME(6) NULL,
"deleted_at" TIMESTAMP WITH TIME ZONE NULL, deleted_at DATETIME(6) NULL
CONSTRAINT "customers_pkey" PRIMARY KEY ("id") ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
);
CREATE UNIQUE INDEX IF NOT EXISTS "idx_customers_email" CREATE UNIQUE INDEX IF NOT EXISTS idx_customers_email
ON "public"."customers" ( ON b2b_customers (email);
"email" ASC
); CREATE INDEX IF NOT EXISTS idx_customers_deleted_at
CREATE INDEX IF NOT EXISTS "idx_customers_deleted_at" ON b2b_customers (deleted_at);
ON "public"."customers" (
"deleted_at" ASC
);
-- customer_repo_accesses -- customer_repo_accesses
CREATE TABLE IF NOT EXISTS "public"."customer_repo_accesses" ( -- CREATE TABLE IF NOT EXISTS b2b_customer_repo_accesses (
"user_id" BIGINT NOT NULL, -- user_id BIGINT NOT NULL,
"repo_id" BIGINT NOT NULL, -- repo_id BIGINT NOT NULL,
PRIMARY KEY ("user_id", "repo_id"), -- PRIMARY KEY (user_id, repo_id),
FOREIGN KEY ("user_id") REFERENCES "public"."customers" ("id") ON DELETE CASCADE, -- CONSTRAINT fk_customer_repo_user
FOREIGN KEY ("repo_id") REFERENCES "public"."repository" ("id") ON DELETE CASCADE -- FOREIGN KEY (user_id) REFERENCES b2b_customers(id)
); -- ON DELETE CASCADE,
-- CONSTRAINT fk_customer_repo_repo
-- FOREIGN KEY (repo_id) REFERENCES repository(id)
-- ON DELETE CASCADE
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- refresh_tokens -- refresh_tokens
CREATE TABLE IF NOT EXISTS "public"."refresh_tokens" ( CREATE TABLE IF NOT EXISTS b2b_refresh_tokens (
"id" SERIAL, id INT AUTO_INCREMENT PRIMARY KEY,
"customer_id" BIGINT NOT NULL, customer_id INT NOT NULL,
"token_hash" VARCHAR(64) NOT NULL, token_hash VARCHAR(64) NOT NULL,
"expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, expires_at DATETIME(6) NOT NULL,
"created_at" TIMESTAMP WITH TIME ZONE NOT NULL, created_at DATETIME(6) NOT NULL,
CONSTRAINT "refresh_tokens_pkey" PRIMARY KEY ("id"), CONSTRAINT fk_refresh_tokens_customer FOREIGN KEY (customer_id) REFERENCES b2b_customers(id) ON DELETE CASCADE
CONSTRAINT "fk_refresh_tokens_customer" FOREIGN KEY ("customer_id") REFERENCES "public"."customers" ("id") ON DELETE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
); CREATE UNIQUE INDEX IF NOT EXISTS uk_refresh_tokens_token_hash ON b2b_refresh_tokens (token_hash);
CREATE UNIQUE INDEX IF NOT EXISTS "uk_refresh_tokens_token_hash" CREATE INDEX IF NOT EXISTS idx_refresh_tokens_customer_id ON b2b_refresh_tokens (customer_id);
ON "public"."refresh_tokens" (
"token_hash" ASC
);
CREATE INDEX IF NOT EXISTS "idx_refresh_tokens_customer_id"
ON "public"."refresh_tokens" (
"customer_id" ASC
);
-- insert sample admin user admin@ma-al.com/Maal12345678 -- insert sample admin user admin@ma-al.com/Maal12345678
INSERT INTO "public"."customers" ("id", "email", "password", "first_name", "last_name", "role", "provider", "provider_id", "avatar_url", "is_active", "email_verified", "email_verification_token", "email_verification_expires", "password_reset_token", "password_reset_expires", "last_password_reset_request", "last_login_at", "lang", "created_at", "updated_at", "deleted_at") VALUES (1, 'admin@ma-al.com', '$2a$10$Owy9DjrS0l3Fz4XoOvh5pulgmOMqdwXmb7hYE9BovnSuWS2plGr82', 'Super', 'Admin', 'admin', 'local', '', '', true, true, NULL, NULL, '', NULL, NULL, NULL, 'pl', '2026-03-02 16:55:10.25274+00', '2026-03-02 16:55:10.25274+00', NULL) ON CONFLICT DO NOTHING;
INSERT IGNORE INTO b2b_customers (id, email, password, first_name, last_name, role, provider, provider_id, avatar_url, is_active, email_verified, email_verification_token, email_verification_expires, password_reset_token, password_reset_expires, last_password_reset_request, last_login_at, lang, created_at, updated_at, deleted_at)
VALUES
(1, 'admin@ma-al.com', '$2a$10$Owy9DjrS0l3Fz4XoOvh5pulgmOMqdwXmb7hYE9BovnSuWS2plGr82', 'Super', 'Admin', 'admin', 'local', '', '', 1, 1, NULL, NULL, '', NULL, NULL, NULL, 'pl', '2026-03-02 16:55:10.252740', '2026-03-02 16:55:10.252740', NULL);
-- +goose Down -- +goose Down
DROP TABLE IF EXISTS "public"."language"; DROP TABLE IF EXISTS b2b_language;
DROP TABLE IF EXISTS "public"."components"; DROP TABLE IF EXISTS b2b_components;
DROP TABLE IF EXISTS "public"."scopes"; DROP TABLE IF EXISTS b2b_scopes;
DROP TABLE IF EXISTS "public"."translations"; DROP TABLE IF EXISTS b2b_translations;
DROP TABLE IF EXISTS "public"."customers"; DROP TABLE IF EXISTS b2b_customers;
DROP TABLE IF EXISTS "public"."refresh_tokens"; DROP TABLE IF EXISTS b2b_refresh_tokens;

View File

@@ -2,272 +2,271 @@
-- Dump translations from database -- Dump translations from database
-- Components -- Components
INSERT INTO components (id, name) VALUES INSERT IGNORE INTO b2b_components (id, name) VALUES
(1, 'be'), (1, 'be'),
(2, 'login'), (2, 'login'),
(3, 'verify_email'), (3, 'verify_email'),
(100, 'email'), (100, 'email'),
(101, 'error'), (101, 'error'),
(102, 'auth'), (102, 'auth'),
(103, 'email'), (103, 'email'),
(300, 'general'), (300, 'general'),
(301, 'validate_error'), (301, 'validate_error'),
(302, 'repo_chart'), (302, 'repo_chart'),
(303, 'verify_email') ON CONFLICT DO NOTHING; (303, 'verify_email');
-- Scope -- Scope
INSERT INTO scopes (id, name) VALUES (3, 'backoffice') ON CONFLICT DO NOTHING; INSERT IGNORE INTO b2b_scopes (id, name) VALUES
(3, 'backoffice');
-- Translations -- Translations
-- Component: general -- Component: general
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations
(1, 3, 300, 'already_have_an_account', 'Masz już konto?'), (lang_id, scope_id, component_id, `key`, data)
(1, 3, 300, 'and', 'i'), VALUES
(1, 3, 300, 'back_to_sign_in', 'Powrót do logowania'), (1, 3, 300, 'already_have_an_account', 'Masz już konto?'),
(1, 3, 300, 'by_signing_in_you_agree_to_our', 'Logując się, zgadzasz się z naszymi'), (1, 3, 300, 'and', 'i'),
(1, 3, 300, 'check_your_email', 'Sprawdź swoją skrzynkę e-mail'), (1, 3, 300, 'back_to_sign_in', 'Powrót do logowania'),
(1, 3, 300, 'close', 'zamknij'), (1, 3, 300, 'by_signing_in_you_agree_to_our', 'Logując się, zgadzasz się z naszymi'),
(1, 3, 300, 'confirm_password', 'Potwierdź hasło'), (1, 3, 300, 'check_your_email', 'Sprawdź swoją skrzynkę e-mail'),
(1, 3, 300, 'confirm_your_new_password', 'Potwierdź swoje nowe hasło'), (1, 3, 300, 'confirm_password', 'Potwierdź hasło'),
(1, 3, 300, 'confirm_your_password', 'Potwierdź swoje hasło'), (1, 3, 300, 'confirm_your_new_password', 'Potwierdź swoje nowe hasło'),
(1, 3, 300, 'continue_with_google', 'Kontynuuj z Google'), (1, 3, 300, 'confirm_your_password', 'Potwierdź swoje hasło'),
(1, 3, 300, 'create_account', 'Utwórz konto'), (1, 3, 300, 'continue_with_google', 'Kontynuuj z Google'),
(1, 3, 300, 'create_account_now', 'Utwórz konto teraz'), (1, 3, 300, 'create_account', 'Utwórz konto'),
(1, 3, 300, 'dont_have_an_account', 'Nie masz konta'), (1, 3, 300, 'create_account_now', 'Utwórz konto teraz'),
(1, 3, 300, 'email_address', 'Adres e-mail'), (1, 3, 300, 'dont_have_an_account', 'Nie masz konta'),
(1, 3, 300, 'enter_email_for_password_reset', 'Wpisz swój adres e-mail, a wyślemy Ci link do zresetowania hasła.'), (1, 3, 300, 'email_address', 'Adres e-mail'),
(1, 3, 300, 'enter_your_email', 'Wpisz swój adres e-mail'), (1, 3, 300, 'enter_email_for_password_reset', 'Wpisz swój adres e-mail, a wyślemy Ci link do zresetowania hasła.'),
(1, 3, 300, 'enter_your_new_password', 'Wpisz swoje nowe hasło'), (1, 3, 300, 'enter_your_email', 'Wpisz swój adres e-mail'),
(1, 3, 300, 'enter_your_password', 'Wpisz swoje hasło'), (1, 3, 300, 'enter_your_new_password', 'Wpisz swoje nowe hasło'),
(1, 3, 300, 'first_name', 'Imię'), (1, 3, 300, 'enter_your_password', 'Wpisz swoje hasło'),
(1, 3, 300, 'forgot_password', 'Zapomniałeś hasła'), (1, 3, 300, 'first_name', 'Imię'),
(1, 3, 300, 'i_agree_to_the', 'Zgadzam się z'), (1, 3, 300, 'forgot_password', 'Zapomniałeś hasła'),
(1, 3, 300, 'last_name', 'Nazwisko'), (1, 3, 300, 'i_agree_to_the', 'Zgadzam się z'),
(1, 3, 300, 'logout', 'Wyloguj się'), (1, 3, 300, 'last_name', 'Nazwisko'),
(1, 3, 300, 'new_password', 'Nowe hasło'), (1, 3, 300, 'new_password', 'Nowe hasło'),
(1, 3, 300, 'or', 'albo'), (1, 3, 300, 'password', 'Hasło'),
(1, 3, 300, 'password', 'Hasło'), (1, 3, 300, 'password_reset_link_sent_notice', 'Jeśli konto z tym adresem e-mail istnieje, wysłaliśmy link do resetowania hasła. Sprawdź swoją skrzynkę odbiorczą'),
(1, 3, 300, 'password_reset_link_sent_notice', 'Jeśli konto z tym adresem e-mail istnieje, wysłaliśmy link do resetowania hasła. Sprawdź swoją skrzynkę odbiorczą'), (1, 3, 300, 'password_updated', 'Hasło zaktualizowane'),
(1, 3, 300, 'password_updated', 'Hasło zaktualizowane'), (1, 3, 300, 'password_updated_description', 'Twoje hasło zostało pomyślnie zaktualizowane'),
(1, 3, 300, 'password_updated_description', 'Twoje hasło zostało pomyślnie zaktualizowane'), (1, 3, 300, 'privacy_policy', 'Polityka prywatności'),
(1, 3, 300, 'privacy_policy', 'Polityka prywatności'), (1, 3, 300, 'reset_password', 'Resetuj hasło'),
(1, 3, 300, 'reset_password', 'Resetuj hasło'), (1, 3, 300, 'send_password_reset_link', 'Wyślij link do resetowania hasła'),
(1, 3, 300, 'send_password_reset_link', 'Wyślij link do resetowania hasła'), (1, 3, 300, 'sign_in', 'Zaloguj się'),
(1, 3, 300, 'sign_in', 'Zaloguj się'), (1, 3, 300, 'terms_of_service', 'Regulamin'),
(1, 3, 300, 'terms_of_service', 'Regulamin'), (2, 3, 300, 'already_have_an_account', 'Already have an account?'),
(2, 3, 300, 'already_have_an_account', 'Already have an account?'), (2, 3, 300, 'and', 'and'),
(2, 3, 300, 'and', 'and'), (2, 3, 300, 'back_to_sign_in', 'Back to Sign In'),
(2, 3, 300, 'back_to_sign_in', 'Back to Sign In'), (2, 3, 300, 'by_signing_in_you_agree_to_our', 'By signing in, you agree to our terms'),
(2, 3, 300, 'by_signing_in_you_agree_to_our', 'By signing in, you agree to our terms'), (2, 3, 300, 'check_your_email', 'Check your email'),
(2, 3, 300, 'check_your_email', 'Check your email'), (2, 3, 300, 'confirm_password', 'Confirm password'),
(2, 3, 300, 'close', 'close'), (2, 3, 300, 'confirm_your_new_password', 'Confirm your new password'),
(2, 3, 300, 'confirm_password', 'Confirm password'), (2, 3, 300, 'confirm_your_password', 'Confirm your password'),
(2, 3, 300, 'confirm_your_new_password', 'Confirm your new password'), (2, 3, 300, 'continue_with_google', 'Continue with Google'),
(2, 3, 300, 'confirm_your_password', 'Confirm your password'), (2, 3, 300, 'create_account', 'Create account'),
(2, 3, 300, 'continue_with_google', 'Continue with Google'), (2, 3, 300, 'create_account_now', 'Create an account now'),
(2, 3, 300, 'create_account', 'Create account'), (2, 3, 300, 'dont_have_an_account', 'Don''t have an account'),
(2, 3, 300, 'create_account_now', 'Create an account now'), (2, 3, 300, 'email_address', 'Email address'),
(2, 3, 300, 'dont_have_an_account', 'Don''t have an account'), (2, 3, 300, 'enter_email_for_password_reset', 'Enter your email address, and well send you a link to reset your password.'),
(2, 3, 300, 'email_address', 'Email address'), (2, 3, 300, 'enter_your_email', 'Enter your email'),
(2, 3, 300, 'enter_email_for_password_reset', 'Enter your email address, and well send you a link to reset your password.'), (2, 3, 300, 'enter_your_new_password', 'Enter your new password'),
(2, 3, 300, 'enter_your_email', 'Enter your email'), (2, 3, 300, 'enter_your_password', 'Enter your password'),
(2, 3, 300, 'enter_your_new_password', 'Enter your new password'), (2, 3, 300, 'first_name', 'First name'),
(2, 3, 300, 'enter_your_password', 'Enter your password'), (2, 3, 300, 'forgot_password', 'Forgot password'),
(2, 3, 300, 'first_name', 'First name'), (2, 3, 300, 'i_agree_to_the', 'I agree to the'),
(2, 3, 300, 'forgot_password', 'Forgot password'), (2, 3, 300, 'last_name', 'Last name'),
(2, 3, 300, 'i_agree_to_the', 'I agree to the'), (2, 3, 300, 'new_password', 'New password'),
(2, 3, 300, 'last_name', 'Last name'), (2, 3, 300, 'password', 'Password'),
(2, 3, 300, 'logout', 'Logout'), (2, 3, 300, 'password_reset_link_sent_notice', 'If an account with that email exists, we have sent a password reset link. Please check your inbox.'),
(2, 3, 300, 'new_password', 'New password'), (2, 3, 300, 'password_updated', 'Password updated'),
(2, 3, 300, 'or', 'or'), (2, 3, 300, 'password_updated_description', 'Your password has been successfully updated'),
(2, 3, 300, 'password', 'Password'), (2, 3, 300, 'privacy_policy', 'Privacy Policy'),
(2, 3, 300, 'password_reset_link_sent_notice', 'If an account with that email exists, we have sent a password reset link. Please check your inbox.'), (2, 3, 300, 'reset_password', 'Reset Password'),
(2, 3, 300, 'password_updated', 'Password updated'), (2, 3, 300, 'send_password_reset_link', 'Send password reset link'),
(2, 3, 300, 'password_updated_description', 'Your password has been successfully updated'), (2, 3, 300, 'sign_in', 'Sign in'),
(2, 3, 300, 'privacy_policy', 'Privacy Policy'), (2, 3, 300, 'terms_of_service', 'Terms of Service'),
(2, 3, 300, 'reset_password', 'Reset Password'), (3, 3, 300, 'already_have_an_account', 'Už máte účet?'),
(2, 3, 300, 'send_password_reset_link', 'Send password reset link'), (3, 3, 300, 'and', 'a'),
(2, 3, 300, 'sign_in', 'Sign in'), (3, 3, 300, 'back_to_sign_in', 'Zpět k přihlášení'),
(2, 3, 300, 'terms_of_service', 'Terms of Service'), (3, 3, 300, 'by_signing_in_you_agree_to_our', 'Přihlášením souhlasíte s našimi'),
(3, 3, 300, 'already_have_an_account', 'Už máte účet?'), (3, 3, 300, 'check_your_email', 'Zkontrolujte svůj e-mail'),
(3, 3, 300, 'and', 'a'), (3, 3, 300, 'confirm_password', 'Potvrzení hesla'),
(3, 3, 300, 'back_to_sign_in', 'Zpět k přihlášení'), (3, 3, 300, 'confirm_your_new_password', 'Potvrďte své nové heslo'),
(3, 3, 300, 'by_signing_in_you_agree_to_our', 'Přihlášením souhlasíte s našimi'), (3, 3, 300, 'confirm_your_password', 'Potvrďte své heslo'),
(3, 3, 300, 'check_your_email', 'Zkontrolujte svůj e-mail'), (3, 3, 300, 'continue_with_google', 'Pokračovat s Googlem'),
(3, 3, 300, 'close', 'zavřít'), (3, 3, 300, 'create_account', 'Vytvořit účet'),
(3, 3, 300, 'confirm_password', 'Potvrzení hesla'), (3, 3, 300, 'create_account_now', 'Vytvořte účet nyní'),
(3, 3, 300, 'confirm_your_new_password', 'Potvrďte své nové heslo'), (3, 3, 300, 'dont_have_an_account', 'Nemáte účet'),
(3, 3, 300, 'confirm_your_password', 'Potvrďte své heslo'), (3, 3, 300, 'email_address', 'E-mailová adresa'),
(3, 3, 300, 'continue_with_google', 'Pokračovat s Googlem'), (3, 3, 300, 'enter_email_for_password_reset', 'Zadejte svou e-mailovou adresu a pošleme vám odkaz pro obnovení hesla.'),
(3, 3, 300, 'create_account', 'Vytvořit účet'), (3, 3, 300, 'enter_your_email', 'Zadejte svůj e-mail'),
(3, 3, 300, 'create_account_now', 'Vytvořte účet nyní'), (3, 3, 300, 'enter_your_new_password', 'Zadejte své nové heslo'),
(3, 3, 300, 'dont_have_an_account', 'Nemáte účet'), (3, 3, 300, 'enter_your_password', 'Zadejte své heslo'),
(3, 3, 300, 'email_address', 'E-mailová adresa'), (3, 3, 300, 'first_name', 'Křestní jméno'),
(3, 3, 300, 'enter_email_for_password_reset', 'Zadejte svou e-mailovou adresu a pošleme vám odkaz pro obnovení hesla.'), (3, 3, 300, 'forgot_password', 'Zapomněli jste heslo'),
(3, 3, 300, 'enter_your_email', 'Zadejte svůj e-mail'), (3, 3, 300, 'i_agree_to_the', 'Souhlasím s'),
(3, 3, 300, 'enter_your_new_password', 'Zadejte své nové heslo'), (3, 3, 300, 'last_name', 'Příjmení'),
(3, 3, 300, 'enter_your_password', 'Zadejte své heslo'), (3, 3, 300, 'new_password', 'Nové heslo'),
(3, 3, 300, 'first_name', 'Křestní jméno'), (3, 3, 300, 'password', 'Heslo'),
(3, 3, 300, 'forgot_password', 'Zapomněli jste heslo'), (3, 3, 300, 'password_reset_link_sent_notice', 'Pokud účet s touto e-mailovou adresou existuje, poslali jsme odkaz pro obnovení hesla. Zkontrolujte svůj inbox.'),
(3, 3, 300, 'i_agree_to_the', 'Souhlasím s'), (3, 3, 300, 'password_updated', 'Heslo aktualizováno'),
(3, 3, 300, 'last_name', 'Příjmení'), (3, 3, 300, 'password_updated_description', 'Vaše heslo bylo úspěšně aktualizováno'),
(3, 3, 300, 'logout', 'Odhlásit se'), (3, 3, 300, 'privacy_policy', 'Zásady ochrany osobních údajů'),
(3, 3, 300, 'new_password', 'Nové heslo'), (3, 3, 300, 'reset_password', 'Resetovat heslo'),
(3, 3, 300, 'or', 'nebo'), (3, 3, 300, 'send_password_reset_link', 'Odeslat odkaz pro obnovení hesla'),
(3, 3, 300, 'password', 'Heslo'), (3, 3, 300, 'sign_in', 'Přihlásit se'),
(3, 3, 300, 'password_reset_link_sent_notice', 'Pokud účet s touto e-mailovou adresou existuje, poslali jsme odkaz pro obnovení hesla. Zkontrolujte svůj inbox.'), (3, 3, 300, 'terms_of_service', 'Podmínky služby');
(3, 3, 300, 'password_updated', 'Heslo aktualizováno'),
(3, 3, 300, 'password_updated_description', 'Vaše heslo bylo úspěšně aktualizováno'),
(3, 3, 300, 'privacy_policy', 'Zásady ochrany osobních údajů'),
(3, 3, 300, 'reset_password', 'Resetovat heslo'),
(3, 3, 300, 'send_password_reset_link', 'Odeslat odkaz pro obnovení hesla'),
(3, 3, 300, 'sign_in', 'Přihlásit se'),
(3, 3, 300, 'terms_of_service', 'Podmínky služby') ON CONFLICT DO NOTHING;
-- Component: validate_error -- Component: validate_error
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations
(1, 3, 301, 'confirm_password_required', 'Potwierdź hasło'), (lang_id, scope_id, component_id, `key`, data)
(1, 3, 301, 'email_required', 'Adres e-mail jest wymagany'), VALUES
(1, 3, 301, 'first_name_required', 'Imię jest wymagane'), (1, 3, 301, 'confirm_password_required', 'Potwierdź hasło'),
(1, 3, 301, 'last_name_required', 'Nazwisko jest wymagane'), (1, 3, 301, 'email_required', 'Adres e-mail jest wymagany'),
(1, 3, 301, 'no_issues_for_quarter', 'Nie znaleziono zgłoszeń w tym kwartale'), (1, 3, 301, 'first_name_required', 'Imię jest wymagane'),
(1, 3, 301, 'password_required', 'Hasło jest wymagane'), (1, 3, 301, 'last_name_required', 'Nazwisko jest wymagane'),
(1, 3, 301, 'registration_validation_password_not_same', 'Hasła nie są takie same'), (1, 3, 301, 'no_issues_for_quarter', 'Nie znaleziono zgłoszeń w tym kwartale'),
(1, 3, 301, 'registration_validation_password_requirements', 'Wymagania dotyczące hasła przy rejestracji'), (1, 3, 301, 'password_required', 'Hasło jest wymagane'),
(2, 3, 301, 'confirm_password_required', 'Confirm password is required'), (1, 3, 301, 'registration_validation_password_not_same', 'Hasła nie są takie same'),
(2, 3, 301, 'email_required', 'Email is required'), (1, 3, 301, 'registration_validation_password_requirements', 'Wymagania dotyczące hasła przy rejestracji'),
(2, 3, 301, 'first_name_required', 'First name is required'), (2, 3, 301, 'confirm_password_required', 'Confirm password is required'),
(2, 3, 301, 'last_name_required', 'Last name is required'), (2, 3, 301, 'email_required', 'Email is required'),
(2, 3, 301, 'no_issues_for_quarter', 'No issues found for this quarter'), (2, 3, 301, 'first_name_required', 'First name is required'),
(2, 3, 301, 'password_required', 'Password is required'), (2, 3, 301, 'last_name_required', 'Last name is required'),
(2, 3, 301, 'registration_validation_password_not_same', 'Passwords do not match'), (2, 3, 301, 'no_issues_for_quarter', 'No issues found for this quarter'),
(2, 3, 301, 'registration_validation_password_requirements', 'Password requirements for registration'), (2, 3, 301, 'password_required', 'Password is required'),
(3, 3, 301, 'confirm_password_required', 'Potvrďte heslo'), (2, 3, 301, 'registration_validation_password_not_same', 'Passwords do not match'),
(3, 3, 301, 'email_required', 'E-mail je povinný'), (2, 3, 301, 'registration_validation_password_requirements', 'Password requirements for registration'),
(3, 3, 301, 'first_name_required', 'Jméno je povinné'), (3, 3, 301, 'confirm_password_required', 'Potvrďte heslo'),
(3, 3, 301, 'last_name_required', 'Příjmení je povinné'), (3, 3, 301, 'email_required', 'E-mail je povinný'),
(3, 3, 301, 'no_issues_for_quarter', 'Nebyla nalezena žádná issues pro toto čtvrtletí'), (3, 3, 301, 'first_name_required', 'Jméno je povinné'),
(3, 3, 301, 'password_required', 'Heslo je povinné'), (3, 3, 301, 'last_name_required', 'Příjmení je povinné'),
(3, 3, 301, 'registration_validation_password_not_same', 'Hesla se neshodují'), (3, 3, 301, 'no_issues_for_quarter', 'Nebyla nalezena žádná issues pro toto čtvrtletí'),
(3, 3, 301, 'registration_validation_password_requirements', 'Požadavky na heslo při registraci') ON CONFLICT DO NOTHING; (3, 3, 301, 'password_required', 'Heslo je povinné'),
(3, 3, 301, 'registration_validation_password_not_same', 'Hesla se neshodují'),
(3, 3, 301, 'registration_validation_password_requirements', 'Požadavky na heslo při registraci');
-- Component: repo_chart -- Component: repo_chart
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations
(1, 3, 302, 'all_quarters', 'Wszystkie kwartały'), (lang_id, scope_id, component_id, `key`, data)
(1, 3, 302, 'created_on', 'Utworzono'), VALUES
(1, 3, 302, 'failed_to_load_issues', 'Nie udało się załadować zadań'), (1, 3, 302, 'all_quarters', 'Wszystkie kwartały'),
(1, 3, 302, 'failed_to_load_quarters', 'Nie udało się załadować kwartałów'), (1, 3, 302, 'created_on', 'Utworzono'),
(1, 3, 302, 'failed_to_load_repositories', 'Nie udało się załadować repozytoriów'), (1, 3, 302, 'failed_to_load_issues', 'Nie udało się załadować zadań'),
(1, 3, 302, 'failed_to_load_years', 'Nie udało się załadować lat'), (1, 3, 302, 'failed_to_load_quarters', 'Nie udało się załadować kwartałów'),
(1, 3, 302, 'hours', 'Godziny'), (1, 3, 302, 'failed_to_load_repositories', 'Nie udało się załadować repozytoriów'),
(1, 3, 302, 'hours_spent', 'Spędzone godziny'), (1, 3, 302, 'failed_to_load_years', 'Nie udało się załadować lat'),
(1, 3, 302, 'hours_worked', 'Przepracowane godziny'), (1, 3, 302, 'hours', 'Godziny'),
(1, 3, 302, 'issue_name', 'Nazwa zadania'), (1, 3, 302, 'hours_spent', 'Spędzone godziny'),
(1, 3, 302, 'issues_for', 'Zadania dla'), (1, 3, 302, 'hours_worked', 'Przepracowane godziny'),
(1, 3, 302, 'loading', 'Ładowanie'), (1, 3, 302, 'issue_name', 'Nazwa zadania'),
(1, 3, 302, 'login_to_view_charts', 'Zaloguj się, aby zobaczyć wykresy pracy repozytoriów.'), (1, 3, 302, 'issues_for', 'Zadania dla'),
(1, 3, 302, 'no_work_data_available', 'Brak danych o pracy dla wybranych kryteriów.'), (1, 3, 302, 'loading', 'Ładowanie'),
(1, 3, 302, 'quarter', 'Kwartał'), (1, 3, 302, 'login_to_view_charts', 'Zaloguj się, aby zobaczyć wykresy pracy repozytoriów.'),
(1, 3, 302, 'repository', 'Repozytorium'), (1, 3, 302, 'no_work_data_available', 'Brak danych o pracy dla wybranych kryteriów.'),
(1, 3, 302, 'repository_work_chart', 'Wykres pracy repozytorium'), (1, 3, 302, 'quarter', 'Kwartał'),
(1, 3, 302, 'select_a_repository', 'Wybierz repozytorium'), (1, 3, 302, 'repository', 'Repozytorium'),
(1, 3, 302, 'select_a_year', 'Wybrany rok'), (1, 3, 302, 'repository_work_chart', 'Wykres pracy repozytorium'),
(1, 3, 302, 'select_quarter_to_view_issues', 'Proszę wybrać kwartał, aby zobaczyć zadania.'), (1, 3, 302, 'select_a_repository', 'Wybierz repozytorium'),
(1, 3, 302, 'select_repo_to_view_data', 'Proszę wybrać repozytorium, aby zobaczyć dane o pracy.'), (1, 3, 302, 'select_a_year', 'Wybrany rok'),
(1, 3, 302, 'select_year_to_view_data', 'Proszę wybrać rok, aby zobaczyć dane o pracy.'), (1, 3, 302, 'select_quarter_to_view_issues', 'Proszę wybrać kwartał, aby zobaczyć zadania.'),
(1, 3, 302, 'user_initials', 'Inicjały użytkownika'), (1, 3, 302, 'select_repo_to_view_data', 'Proszę wybrać repozytorium, aby zobaczyć dane o pracy.'),
(1, 3, 302, 'work_by_quarter', 'Wykonana praca według kwartałów (godziny)'), (1, 3, 302, 'select_year_to_view_data', 'Proszę wybrać rok, aby zobaczyć dane o pracy.'),
(1, 3, 302, 'work_done_by_quarter', 'Wykonana praca według kwartałów'), (1, 3, 302, 'user_initials', 'Inicjały użytkownika'),
(1, 3, 302, 'year', 'Rok'), (1, 3, 302, 'work_by_quarter', 'Wykonana praca według kwartałów (godziny)'),
(2, 3, 302, 'all_quarters', 'All Quarters'), (1, 3, 302, 'work_done_by_quarter', 'Wykonana praca według kwartałów'),
(2, 3, 302, 'created_on', 'Created On'), (1, 3, 302, 'year', 'Rok'),
(2, 3, 302, 'failed_to_load_issues', 'Failed to load issues'), (2, 3, 302, 'all_quarters', 'All Quarters'),
(2, 3, 302, 'failed_to_load_quarters', 'Failed to load quarters'), (2, 3, 302, 'created_on', 'Created On'),
(2, 3, 302, 'failed_to_load_repositories', 'Failed to load repositories'), (2, 3, 302, 'failed_to_load_issues', 'Failed to load issues'),
(2, 3, 302, 'failed_to_load_years', 'Failed to load years'), (2, 3, 302, 'failed_to_load_quarters', 'Failed to load quarters'),
(2, 3, 302, 'hours', 'Hours'), (2, 3, 302, 'failed_to_load_repositories', 'Failed to load repositories'),
(2, 3, 302, 'hours_spent', 'Hours Spent'), (2, 3, 302, 'failed_to_load_years', 'Failed to load years'),
(2, 3, 302, 'hours_worked', 'Hours Worked'), (2, 3, 302, 'hours', 'Hours'),
(2, 3, 302, 'issue_name', 'Issue Name'), (2, 3, 302, 'hours_spent', 'Hours Spent'),
(2, 3, 302, 'issues_for', 'Issues for'), (2, 3, 302, 'hours_worked', 'Hours Worked'),
(2, 3, 302, 'loading', 'Loading'), (2, 3, 302, 'issue_name', 'Issue Name'),
(2, 3, 302, 'login_to_view_charts', 'Please log in to view repository work charts.'), (2, 3, 302, 'issues_for', 'Issues for'),
(2, 3, 302, 'no_work_data_available', 'No work data available for the selected criteria.'), (2, 3, 302, 'loading', 'Loading'),
(2, 3, 302, 'quarter', 'Quarter'), (2, 3, 302, 'login_to_view_charts', 'Please log in to view repository work charts.'),
(2, 3, 302, 'repository', 'Repository'), (2, 3, 302, 'no_work_data_available', 'No work data available for the selected criteria.'),
(2, 3, 302, 'repository_work_chart', 'Repository Work Chart'), (2, 3, 302, 'quarter', 'Quarter'),
(2, 3, 302, 'select_a_repository', 'Select a repository'), (2, 3, 302, 'repository', 'Repository'),
(2, 3, 302, 'select_a_year', 'Select a year'), (2, 3, 302, 'repository_work_chart', 'Repository Work Chart'),
(2, 3, 302, 'select_quarter_to_view_issues', 'Please select a quarter to view issues.'), (2, 3, 302, 'select_a_repository', 'Select a repository'),
(2, 3, 302, 'select_repo_to_view_data', 'Please select a repository to view work data.'), (2, 3, 302, 'select_a_year', 'Select a year'),
(2, 3, 302, 'select_year_to_view_data', 'Please select a year to view work data.'), (2, 3, 302, 'select_quarter_to_view_issues', 'Please select a quarter to view issues.'),
(2, 3, 302, 'user_initials', 'User Initials'), (2, 3, 302, 'select_repo_to_view_data', 'Please select a repository to view work data.'),
(2, 3, 302, 'work_by_quarter', 'Work Done by Quarter (Hours)'), (2, 3, 302, 'select_year_to_view_data', 'Please select a year to view work data.'),
(2, 3, 302, 'work_done_by_quarter', 'Work Done by Quarter'), (2, 3, 302, 'user_initials', 'User Initials'),
(2, 3, 302, 'year', 'Year'), (2, 3, 302, 'work_by_quarter', 'Work Done by Quarter (Hours)'),
(3, 3, 302, 'all_quarters', 'Všechna čtvrtletí'), (2, 3, 302, 'work_done_by_quarter', 'Work Done by Quarter'),
(3, 3, 302, 'created_on', 'Vytvořeno'), (2, 3, 302, 'year', 'Year'),
(3, 3, 302, 'failed_to_load_issues', 'Problémy se nepodařilo načíst'), (3, 3, 302, 'all_quarters', 'Všechna čtvrtletí'),
(3, 3, 302, 'failed_to_load_quarters', 'Nepodařilo se načíst čtvrtletí'), (3, 3, 302, 'created_on', 'Vytvořeno'),
(3, 3, 302, 'failed_to_load_repositories', 'Nepodařilo se načíst repozitáře'), (3, 3, 302, 'failed_to_load_issues', 'Problémy se nepodařilo načíst'),
(3, 3, 302, 'failed_to_load_years', 'Nepodařilo se načíst roky'), (3, 3, 302, 'failed_to_load_quarters', 'Nepodařilo se načíst čtvrtletí'),
(3, 3, 302, 'hours', 'Hodiny'), (3, 3, 302, 'failed_to_load_repositories', 'Nepodařilo se načíst repozitáře'),
(3, 3, 302, 'hours_spent', 'Strávené hodiny'), (3, 3, 302, 'failed_to_load_years', 'Nepodařilo se načíst roky'),
(3, 3, 302, 'hours_worked', 'Odpracované hodiny'), (3, 3, 302, 'hours', 'Hodiny'),
(3, 3, 302, 'issue_name', 'Název úkolu'), (3, 3, 302, 'hours_spent', 'Strávené hodiny'),
(3, 3, 302, 'issues_for', 'úkoly pro'), (3, 3, 302, 'hours_worked', 'Odpracované hodiny'),
(3, 3, 302, 'loading', 'Načítání'), (3, 3, 302, 'issue_name', 'Název úkolu'),
(3, 3, 302, 'login_to_view_charts', 'Přihlaste se pro zobrazení grafů práce repozitářů.'), (3, 3, 302, 'issues_for', 'úkoly pro'),
(3, 3, 302, 'no_work_data_available', 'Pro zvolená kritéria nejsou k dispozici žádná pracovní data.'), (3, 3, 302, 'loading', 'Načítání'),
(3, 3, 302, 'quarter', 'Čtvrtletí'), (3, 3, 302, 'login_to_view_charts', 'Přihlaste se pro zobrazení grafů práce repozitářů.'),
(3, 3, 302, 'repository', 'Repozitář'), (3, 3, 302, 'no_work_data_available', 'Pro zvolená kritéria nejsou k dispozici žádná pracovní data.'),
(3, 3, 302, 'repository_work_chart', 'Graf práce úložiště'), (3, 3, 302, 'quarter', 'Čtvrtletí'),
(3, 3, 302, 'select_a_repository', 'Vyberte repozitář'), (3, 3, 302, 'repository', 'Repozitář'),
(3, 3, 302, 'select_a_year', 'Vyberte rok'), (3, 3, 302, 'repository_work_chart', 'Graf práce úložiště'),
(3, 3, 302, 'select_quarter_to_view_issues', 'Vyberte prosím čtvrtletí pro zobrazení úkolů.'), (3, 3, 302, 'select_a_repository', 'Vyberte repozitář'),
(3, 3, 302, 'select_repo_to_view_data', 'Vyberte prosím repozitář pro zobrazení pracovních dat.'), (3, 3, 302, 'select_a_year', 'Vyberte rok'),
(3, 3, 302, 'select_year_to_view_data', 'Vyberte prosím rok pro zobrazení pracovních dat.'), (3, 3, 302, 'select_quarter_to_view_issues', 'Vyberte prosím čtvrtletí pro zobrazení úkolů.'),
(3, 3, 302, 'user_initials', 'Iniciály uživatele'), (3, 3, 302, 'select_repo_to_view_data', 'Vyberte prosím repozitář pro zobrazení pracovních dat.'),
(3, 3, 302, 'work_by_quarter', 'Práce dokončená po čtvrtletích (hodiny)'), (3, 3, 302, 'select_year_to_view_data', 'Vyberte prosím rok pro zobrazení pracovních dat.'),
(3, 3, 302, 'work_done_by_quarter', 'práce provedená za čtvrtletí'), (3, 3, 302, 'user_initials', 'Iniciály uživatele'),
(3, 3, 302, 'year', 'Rok') ON CONFLICT DO NOTHING; (3, 3, 302, 'work_by_quarter', 'Práce dokončená po čtvrtletích (hodiny)'),
(3, 3, 302, 'work_done_by_quarter', 'práce provedená za čtvrtletí'),
(3, 3, 302, 'year', 'Rok');
-- Component: verify_email -- Component: verify_email
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations
(1, 3, 303, 'already_registered', 'Masz już konto?'), (lang_id, scope_id, component_id, `key`, data)
(1, 3, 303, 'error_message', 'Nie udało nam się zweryfikować Twojego adresu e-mail.'), VALUES
(1, 3, 303, 'error_title', 'Weryfikacja nie powiodła się'), (1, 3, 303, 'already_registered', 'Masz już konto?'),
(1, 3, 303, 'go_to_login', 'Przejdź do logowania'), (1, 3, 303, 'error_message', 'Nie udało nam się zweryfikować Twojego adresu e-mail.'),
(1, 3, 303, 'invalid_token', 'Nieprawidłowy lub brakujący token weryfikacyjny'), (1, 3, 303, 'error_title', 'Weryfikacja nie powiodła się'),
(1, 3, 303, 'please_wait', 'Masz już konto?'), (1, 3, 303, 'go_to_login', 'Przejdź do logowania'),
(1, 3, 303, 'redirect_message', 'Zostaniesz przekierowany na stronę logowania...'), (1, 3, 303, 'invalid_token', 'Nieprawidłowy lub brakujący token weryfikacyjny'),
(1, 3, 303, 'success_message', 'Twój adres e-mail został pomyślnie zweryfikowany.'), (1, 3, 303, 'please_wait', 'Masz już konto?'),
(1, 3, 303, 'success_title', 'E-mail zweryfikowany!'), (1, 3, 303, 'redirect_message', 'Zostaniesz przekierowany na stronę logowania...'),
(1, 3, 303, 'verification_failed', 'Weryfikacja e-maila nie powiodła się'), (1, 3, 303, 'success_message', 'Twój adres e-mail został pomyślnie zweryfikowany.'),
(1, 3, 303, 'verifying', 'Sprawdzanie Twojego adresu e-mail...'), (1, 3, 303, 'success_title', 'E-mail zweryfikowany!'),
(2, 3, 303, 'already_registered', 'Already have an account?'), (1, 3, 303, 'verification_failed', 'Weryfikacja e-maila nie powiodła się'),
(2, 3, 303, 'error_message', 'We could not verify your email.'), (1, 3, 303, 'verifying', 'Sprawdzanie Twojego adresu e-mail...'),
(2, 3, 303, 'error_title', 'Verification Failed'), (2, 3, 303, 'already_registered', 'already registered?'),
(2, 3, 303, 'go_to_login', 'Go to Login'), (2, 3, 303, 'error_message', 'We could not verify your email.'),
(2, 3, 303, 'invalid_token', 'Invalid or missing verification token'), (2, 3, 303, 'error_title', 'Verification Failed'),
(2, 3, 303, 'please_wait', 'Already have an account?'), (2, 3, 303, 'go_to_login', 'Go to Login'),
(2, 3, 303, 'redirect_message', 'You will be redirected to login page...'), (2, 3, 303, 'invalid_token', 'Invalid or missing verification token'),
(2, 3, 303, 'success_message', 'Your email has been verified successfully.'), (2, 3, 303, 'please_wait', 'Already have an account?'),
(2, 3, 303, 'success_title', 'Email Verified!'), (2, 3, 303, 'redirect_message', 'You will be redirected to login page...'),
(2, 3, 303, 'verification_failed', 'Email verification failed'), (2, 3, 303, 'success_message', 'Your email has been verified successfully.'),
(2, 3, 303, 'verifying', 'Verifying your email...'), (2, 3, 303, 'success_title', 'Email Verified!'),
(3, 3, 303, 'already_registered', 'Už máte účet?'), (2, 3, 303, 'verification_failed', 'Email verification failed'),
(3, 3, 303, 'error_message', 'Nepodařilo se nám ověřit váš e-mail.'), (2, 3, 303, 'verifying', 'Verifying your email...'),
(3, 3, 303, 'error_title', 'Ověření selhalo'), (3, 3, 303, 'already_registered', 'Už máte účet?'),
(3, 3, 303, 'go_to_login', 'Přejít na přihlášení'), (3, 3, 303, 'error_message', 'Nepodařilo se nám ověřit váš e-mail.'),
(3, 3, 303, 'invalid_token', 'Neplatný nebo chybějící ověřovací token'), (3, 3, 303, 'error_title', 'Ověření selhalo'),
(3, 3, 303, 'please_wait', 'Už máte účet?'), (3, 3, 303, 'go_to_login', 'Přejít na přihlášení'),
(3, 3, 303, 'redirect_message', 'Budete přesměrováni na přihlašovací stránku...'), (3, 3, 303, 'invalid_token', 'Neplatný nebo chybějící ověřovací token'),
(3, 3, 303, 'success_message', 'Váš e-mail byl úspěšně ověřen.'), (3, 3, 303, 'please_wait', 'Už máte účet?'),
(3, 3, 303, 'success_title', 'E-mail ověřen!'), (3, 3, 303, 'redirect_message', 'Budete přesměrováni na přihlašovací stránku...'),
(3, 3, 303, 'verification_failed', 'Ověření e-mailu selhalo'), (3, 3, 303, 'success_message', 'Váš e-mail byl úspěšně ověřen.'),
(3, 3, 303, 'verifying', 'Ověřování vašeho e-mailu...') ON CONFLICT DO NOTHING; (3, 3, 303, 'success_title', 'E-mail ověřen!'),
(3, 3, 303, 'verification_failed', 'Ověření e-mailu selhalo'),
(3, 3, 303, 'verifying', 'Ověřování vašeho e-mailu...');
-- +goose Down -- +goose Down
-- Remove translations for this scope -- Remove translations for this scope

View File

@@ -2,26 +2,27 @@
-- Dump translations from database -- Dump translations from database
-- Components -- Components
INSERT INTO components (id, name) VALUES INSERT IGNORE INTO b2b_components (id, name) VALUES
(1, 'be'), (1, 'be'),
(2, 'login'), (2, 'login'),
(3, 'verify_email'), (3, 'verify_email'),
(100, 'email'), (100, 'email'),
(101, 'error'), (101, 'error'),
(102, 'auth'), (102, 'auth'),
(103, 'email'), (103, 'email'),
(300, 'general'), (300, 'general'),
(301, 'validate_error'), (301, 'validate_error'),
(302, 'repo_chart'), (302, 'repo_chart'),
(303, 'verify_email') ON CONFLICT DO NOTHING; (303, 'verify_email');
-- Scope -- Scope
INSERT INTO scopes (id, name) VALUES (1, 'Backend') ON CONFLICT DO NOTHING; INSERT IGNORE INTO b2b_scopes (id, name) VALUES
(1, 'Backend');
-- Translations -- Translations
-- Component: be -- Component: be
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES
(1, 1, 1, 'langs_loaded', NULL), (1, 1, 1, 'langs_loaded', NULL),
(1, 1, 1, 'langs_not_loaded', NULL), (1, 1, 1, 'langs_not_loaded', NULL),
(1, 1, 1, 'message_nok', NULL), (1, 1, 1, 'message_nok', NULL),
@@ -39,10 +40,10 @@ INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(3, 1, 1, 'message_nok', NULL), (3, 1, 1, 'message_nok', NULL),
(3, 1, 1, 'message_ok', NULL), (3, 1, 1, 'message_ok', NULL),
(3, 1, 1, 'translations_loaded', NULL), (3, 1, 1, 'translations_loaded', NULL),
(3, 1, 1, 'translations_not_loaded', NULL) ON CONFLICT DO NOTHING; (3, 1, 1, 'translations_not_loaded', NULL);
-- Component: email -- Component: email
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES
(1, 1, 100, 'langs_loaded', NULL), (1, 1, 100, 'langs_loaded', NULL),
(1, 1, 100, 'langs_not_loaded', NULL), (1, 1, 100, 'langs_not_loaded', NULL),
(1, 1, 100, 'message_nok', NULL), (1, 1, 100, 'message_nok', NULL),
@@ -60,10 +61,10 @@ INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(3, 1, 100, 'message_nok', NULL), (3, 1, 100, 'message_nok', NULL),
(3, 1, 100, 'message_ok', NULL), (3, 1, 100, 'message_ok', NULL),
(3, 1, 100, 'translations_loaded', NULL), (3, 1, 100, 'translations_loaded', NULL),
(3, 1, 100, 'translations_not_loaded', NULL) ON CONFLICT DO NOTHING; (3, 1, 100, 'translations_not_loaded', NULL);
-- Component: error -- Component: error
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES
(1, 1, 101, 'err_bad_paging', 'zła paginacja'), (1, 1, 101, 'err_bad_paging', 'zła paginacja'),
(1, 1, 101, 'err_bad_quarter_attribute', 'nieprawidłowy atrybut quarter'), (1, 1, 101, 'err_bad_quarter_attribute', 'nieprawidłowy atrybut quarter'),
(1, 1, 101, 'err_bad_repo_id_attribute', 'nieprawidłowy atrybut repoID'), (1, 1, 101, 'err_bad_repo_id_attribute', 'nieprawidłowy atrybut repoID'),
@@ -144,10 +145,10 @@ INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(3, 1, 101, 'err_token_required', 'je vyžadován token'), (3, 1, 101, 'err_token_required', 'je vyžadován token'),
(3, 1, 101, 'err_user_inactive', 'uživatelský účet je neaktivní'), (3, 1, 101, 'err_user_inactive', 'uživatelský účet je neaktivní'),
(3, 1, 101, 'err_user_not_found', 'uživatel nenalezen'), (3, 1, 101, 'err_user_not_found', 'uživatel nenalezen'),
(3, 1, 101, 'err_verification_token_expired', 'platnost ověřovacího tokenu vypršela') ON CONFLICT DO NOTHING; (3, 1, 101, 'err_verification_token_expired', 'platnost ověřovacího tokenu vypršela');
-- Component: auth -- Component: auth
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES
(1, 1, 102, 'auth_if_account_exists', 'jeśli konto o tym adresie e-mail istnieje, został wysłany link do resetowania hasła'), (1, 1, 102, 'auth_if_account_exists', 'jeśli konto o tym adresie e-mail istnieje, został wysłany link do resetowania hasła'),
(1, 1, 102, 'auth_logged_out_successfully', 'wylogowano pomyślnie'), (1, 1, 102, 'auth_logged_out_successfully', 'wylogowano pomyślnie'),
(1, 1, 102, 'auth_password_reset_successfully', 'pomyślnie zresetowano hasło'), (1, 1, 102, 'auth_password_reset_successfully', 'pomyślnie zresetowano hasło'),
@@ -159,10 +160,10 @@ INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(3, 1, 102, 'auth_if_account_exists', 'Pokud účet s danou e-mailovou adresou existuje, byl odeslán odkaz pro resetování hesla.'), (3, 1, 102, 'auth_if_account_exists', 'Pokud účet s danou e-mailovou adresou existuje, byl odeslán odkaz pro resetování hesla.'),
(3, 1, 102, 'auth_logged_out_successfully', 'úspěšně odhlášen/a'), (3, 1, 102, 'auth_logged_out_successfully', 'úspěšně odhlášen/a'),
(3, 1, 102, 'auth_password_reset_successfully', 'úspěšné obnovení hesla'), (3, 1, 102, 'auth_password_reset_successfully', 'úspěšné obnovení hesla'),
(3, 1, 102, 'auth_registration_successful', 'Registrace úspěšná, prosím ověřte svůj e-mail') ON CONFLICT DO NOTHING; (3, 1, 102, 'auth_registration_successful', 'Registrace úspěšná, prosím ověřte svůj e-mail');
-- Component: email -- Component: email
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES INSERT IGNORE INTO b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES
(1, 1, 103, 'email_admin_notification_title', 'Admin notification title'), (1, 1, 103, 'email_admin_notification_title', 'Admin notification title'),
(1, 1, 103, 'email_footer', 'Wszelkie prawa zastrzeżone.'), (1, 1, 103, 'email_footer', 'Wszelkie prawa zastrzeżone.'),
(1, 1, 103, 'email_greeting', 'Witaj,'), (1, 1, 103, 'email_greeting', 'Witaj,'),
@@ -213,7 +214,7 @@ INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(3, 1, 103, 'email_verification_subject', 'Ověřte svou e-mailovou adresu'), (3, 1, 103, 'email_verification_subject', 'Ověřte svou e-mailovou adresu'),
(3, 1, 103, 'email_verification_title', 'Ověřte svou e-mailovou adresu'), (3, 1, 103, 'email_verification_title', 'Ověřte svou e-mailovou adresu'),
(3, 1, 103, 'email_verify_button', 'Ověření e-mailové adresy'), (3, 1, 103, 'email_verify_button', 'Ověření e-mailové adresy'),
(3, 1, 103, 'email_warning_title', 'Důležité:') ON CONFLICT DO NOTHING; (3, 1, 103, 'email_warning_title', 'Důležité:');
-- +goose Down -- +goose Down
-- Remove translations for this scope -- Remove translations for this scope

View File

@@ -1,181 +0,0 @@
-- +goose Up
-- Dump translations from database
-- Components
INSERT INTO components (id, name) VALUES
(1, 'be'),
(2, 'login'),
(3, 'verify_email'),
(100, 'email'),
(101, 'error'),
(102, 'auth'),
(103, 'email'),
(300, 'general') ON CONFLICT DO NOTHING;
-- Scope
INSERT INTO scopes (id, name) VALUES (1, 'Backend') ON CONFLICT DO NOTHING;
-- Translations
-- Component: email
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(1, 1, 100, 'langs_loaded', NULL),
(1, 1, 100, 'langs_not_loaded', NULL),
(1, 1, 100, 'message_nok', NULL),
(1, 1, 100, 'message_ok', NULL),
(1, 1, 100, 'translations_loaded', NULL),
(1, 1, 100, 'translations_not_loaded', NULL),
(2, 1, 100, 'langs_loaded', NULL),
(2, 1, 100, 'langs_not_loaded', NULL),
(2, 1, 100, 'message_nok', NULL),
(2, 1, 100, 'message_ok', NULL),
(2, 1, 100, 'translations_loaded', NULL),
(2, 1, 100, 'translations_not_loaded', NULL),
(3, 1, 100, 'langs_loaded', NULL),
(3, 1, 100, 'langs_not_loaded', NULL),
(3, 1, 100, 'message_nok', NULL),
(3, 1, 100, 'message_ok', NULL),
(3, 1, 100, 'translations_loaded', NULL),
(3, 1, 100, 'translations_not_loaded', NULL) ON CONFLICT DO NOTHING;
-- Component: error
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(1, 1, 101, 'err_email_exists', 'adres e-mail zajęty'),
(1, 1, 101, 'err_email_not_verified', 'adres e-mail nie został zweryfikowany'),
(1, 1, 101, 'err_email_password_required', 'wymagany jest adres e-mail i hasło'),
(1, 1, 101, 'err_email_required', 'Adres e-mail jest wymagany'),
(1, 1, 101, 'err_first_last_name_required', 'imię i nazwisko są wymagane'),
(1, 1, 101, 'err_internal_server_error', 'błąd wewnętrzny serwera'),
(1, 1, 101, 'err_invalid_body', 'nieprawidłowy tekst zapytania'),
(1, 1, 101, 'err_invalid_credentials', 'nieprawidłowy adres e-mail lub hasło'),
(1, 1, 101, 'err_invalid_password', 'hasło musi mieć co najmniej 10 znaków i zawierać co najmniej jedną małą literę, jedną wielką literę i jedną cyfrę'),
(1, 1, 101, 'err_invalid_reset_token', 'nieprawidłowy token'),
(1, 1, 101, 'err_invalid_token', 'nieprawidłowy token'),
(1, 1, 101, 'err_invalid_verification_token', 'nieprawidłowy token'),
(1, 1, 101, 'err_not_authenticated', 'nie uwierzytelniono'),
(1, 1, 101, 'err_passwords_do_not_match', 'hasła nie pasują'),
(1, 1, 101, 'err_refresh_token_required', 'wymagany jest token odświeżania'),
(1, 1, 101, 'err_reset_token_expired', 'token wygasł'),
(1, 1, 101, 'err_token_expired', 'token wygasł'),
(1, 1, 101, 'err_token_password_required', 'wymagane są token i hasło'),
(1, 1, 101, 'err_token_required', 'wymagany jest token'),
(1, 1, 101, 'err_user_inactive', 'konto użytkownika jest nieaktywne'),
(1, 1, 101, 'err_user_not_found', 'użytkownik nie został znaleziony'),
(1, 1, 101, 'err_verification_token_expired', 'token weryfikacyjny wygasł'),
(2, 1, 101, 'err_email_exists', 'email already exists'),
(2, 1, 101, 'err_email_not_verified', 'email not verified'),
(2, 1, 101, 'err_email_password_required', 'email and password are required'),
(2, 1, 101, 'err_email_required', 'email is required'),
(2, 1, 101, 'err_first_last_name_required', 'first and last name is required'),
(2, 1, 101, 'err_internal_server_error', 'internal server error'),
(2, 1, 101, 'err_invalid_body', 'invalid request body'),
(2, 1, 101, 'err_invalid_credentials', 'invalid email or password'),
(2, 1, 101, 'err_invalid_password', 'password must be at least 10 characters long and contain at least one lowercase letter, one uppercase letter, and one digit'),
(2, 1, 101, 'err_invalid_reset_token', 'invalid reset token'),
(2, 1, 101, 'err_invalid_token', 'invalid token'),
(2, 1, 101, 'err_invalid_verification_token', 'invalid verification token'),
(2, 1, 101, 'err_not_authenticated', 'not authenticated'),
(2, 1, 101, 'err_passwords_do_not_match', 'passwords do not match'),
(2, 1, 101, 'err_refresh_token_required', 'refresh token is required'),
(2, 1, 101, 'err_reset_token_expired', 'reset token has expired'),
(2, 1, 101, 'err_token_expired', 'token has expired'),
(2, 1, 101, 'err_token_password_required', 'token and password are required'),
(2, 1, 101, 'err_token_required', 'token is required'),
(2, 1, 101, 'err_user_inactive', 'user account is inactive'),
(2, 1, 101, 'err_user_not_found', 'user not found'),
(2, 1, 101, 'err_verification_token_expired', 'verification token has expired'),
(3, 1, 101, 'err_email_exists', 'e-mail již existuje'),
(3, 1, 101, 'err_email_not_verified', 'e-mail nebyl ověřen'),
(3, 1, 101, 'err_email_password_required', 'je vyžadován e-mail a heslo'),
(3, 1, 101, 'err_email_required', 'e-mail je povinný'),
(3, 1, 101, 'err_first_last_name_required', 'křestní jméno a příjmení je povinné'),
(3, 1, 101, 'err_internal_server_error', 'interní chyba serveru'),
(3, 1, 101, 'err_invalid_body', 'neplatné tělo požadavku'),
(3, 1, 101, 'err_invalid_credentials', 'neplatný e-mail nebo heslo'),
(3, 1, 101, 'err_invalid_password', 'heslo musí mít alespoň 10 znaků a musí obsahovat alespoň jedno malé písmeno, jedno velké písmeno a jednu číslici'),
(3, 1, 101, 'err_invalid_reset_token', 'neplatný resetovací token'),
(3, 1, 101, 'err_invalid_token', 'neplatný token'),
(3, 1, 101, 'err_invalid_verification_token', 'neplatný ověřovací token'),
(3, 1, 101, 'err_not_authenticated', 'neověřeno'),
(3, 1, 101, 'err_passwords_do_not_match', 'hesla se neshodují'),
(3, 1, 101, 'err_refresh_token_required', 'Je vyžadován token pro obnovení'),
(3, 1, 101, 'err_reset_token_expired', 'Platnost resetovacího tokenu vypršela'),
(3, 1, 101, 'err_token_expired', 'platnost tokenu vypršela'),
(3, 1, 101, 'err_token_password_required', 'je vyžadován token a heslo'),
(3, 1, 101, 'err_token_required', 'je vyžadován token'),
(3, 1, 101, 'err_user_inactive', 'uživatelský účet je neaktivní'),
(3, 1, 101, 'err_user_not_found', 'uživatel nenalezen'),
(3, 1, 101, 'err_verification_token_expired', 'platnost ověřovacího tokenu vypršela') ON CONFLICT DO NOTHING;
-- Component: auth
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(1, 1, 102, 'auth_if_account_exists', 'jeśli konto o tym adresie e-mail istnieje, został wysłany link do resetowania hasła'),
(1, 1, 102, 'auth_logged_out_successfully', 'wylogowano pomyślnie'),
(1, 1, 102, 'auth_password_reset_successfully', 'pomyślnie zresetowano hasło'),
(1, 1, 102, 'auth_registration_successful', 'rejestracja pomyślna, proszę zweryfikować swój adres e-mail'),
(2, 1, 102, 'auth_if_account_exists', 'if an account with that email exists, a password reset link has been sent'),
(2, 1, 102, 'auth_logged_out_successfully', 'logged out successfully'),
(2, 1, 102, 'auth_password_reset_successfully', 'password reset successfully'),
(2, 1, 102, 'auth_registration_successful', 'registration successful, please verify your email'),
(3, 1, 102, 'auth_if_account_exists', 'Pokud účet s danou e-mailovou adresou existuje, byl odeslán odkaz pro resetování hesla.'),
(3, 1, 102, 'auth_logged_out_successfully', 'úspěšně odhlášen/a'),
(3, 1, 102, 'auth_password_reset_successfully', 'úspěšné obnovení hesla'),
(3, 1, 102, 'auth_registration_successful', 'Registrace úspěšná, prosím ověřte svůj e-mail') ON CONFLICT DO NOTHING;
-- Component: email
INSERT INTO translations (lang_id, scope_id, component_id, "key", data) VALUES
(1, 1, 103, 'email_admin_notification_title', 'Admin notification title'),
(1, 1, 103, 'email_footer', 'Wszelkie prawa zastrzeżone.'),
(1, 1, 103, 'email_greeting', 'Witaj,'),
(1, 1, 103, 'email_ignore', 'Jeśli nie jesteś właścicielem tego konta, prosimy o zignorowanie maila.'),
(1, 1, 103, 'email_ignore_reset', 'Jeśli nie chcesz zmieniać hasła, prosimy o zignorowanie maila. Twoje hasło pozostanie niezmienione.'),
(1, 1, 103, 'email_or_copy', 'Bądź przekopiuj poniższy link do przeglądarki:'),
(1, 1, 103, 'email_password_reset_message1', 'Otrzymaliśmy prośbę o zresetowanie Twojego hasła. Aby utworzyć nowe hasło, kliknij w poniższy przycisk:'),
(1, 1, 103, 'email_password_reset_subject', 'Zresetuj hasło'),
(1, 1, 103, 'email_password_reset_title', 'Zresetuj swoje hasło'),
(1, 1, 103, 'email_password_reset_warning', 'Link na zresesetowanie hasła przedawni się po 1 godzinie.'),
(1, 1, 103, 'email_reset_button', 'Zresetuj hasło'),
(1, 1, 103, 'email_verification_message1', 'Dziękujemy za rejestrację. Aby dokończyć proces rejestracji, zweryfikuj swojego maila klikając w poniższy link:'),
(1, 1, 103, 'email_verification_note', 'Uwaga: link weryfikacyjny przedawni się za 24 godziny.'),
(1, 1, 103, 'email_verification_subject', 'Zweryfikuj swój adres email'),
(1, 1, 103, 'email_verification_title', 'Weryfikacja Adresu email'),
(1, 1, 103, 'email_verify_button', 'Zweryfikuj adres email'),
(1, 1, 103, 'email_warning_title', 'Ważne:'),
(2, 1, 103, 'email_admin_notification_title', 'Admin notification title'),
(2, 1, 103, 'email_footer', 'All rights reserved.'),
(2, 1, 103, 'email_greeting', 'Hello,'),
(2, 1, 103, 'email_ignore', 'If you did not create an account with us, please ignore this email.'),
(2, 1, 103, 'email_ignore_reset', 'If you did not request a password reset, please ignore this email. Your password will remain unchanged.'),
(2, 1, 103, 'email_or_copy', 'Or copy and paste this link into your browser:'),
(2, 1, 103, 'email_password_reset_message1', 'We received a request to reset your password. Click the button below to create a new password:'),
(2, 1, 103, 'email_password_reset_subject', 'Reset Your Password'),
(2, 1, 103, 'email_password_reset_title', 'Reset Your Password'),
(2, 1, 103, 'email_password_reset_warning', 'This password reset link will expire in 1 hour for security reasons.'),
(2, 1, 103, 'email_reset_button', 'Reset Password'),
(2, 1, 103, 'email_verification_message1', 'Thank you for registering with us. To complete your registration and activate your account, please verify your email address by clicking the button below:'),
(2, 1, 103, 'email_verification_note', 'Note: This verification link will expire in 24 hours.'),
(2, 1, 103, 'email_verification_subject', 'Verify Your Email Address'),
(2, 1, 103, 'email_verification_title', 'Verify Your Email Address'),
(2, 1, 103, 'email_verify_button', 'Verify Email Address'),
(2, 1, 103, 'email_warning_title', 'Important:'),
(3, 1, 103, 'email_admin_notification_title', 'Admin notification title'),
(3, 1, 103, 'email_footer', 'Všechna práva vyhrazena.'),
(3, 1, 103, 'email_greeting', 'Ahoj,'),
(3, 1, 103, 'email_ignore', 'Pokud jste si u nás nevytvořili účet, prosím, ignorujte tento e-mail.'),
(3, 1, 103, 'email_ignore_reset', 'Pokud jste nepožádali o obnovení hesla, ignorujte prosím tento e-mail. Vaše heslo zůstane nezměněno.'),
(3, 1, 103, 'email_or_copy', 'Nebo zkopírujte a vložte tento odkaz do prohlížeče:'),
(3, 1, 103, 'email_password_reset_message1', 'Obdrželi jsme žádost o obnovení hesla. Klikněte na tlačítko níže a vytvořte si nové heslo:'),
(3, 1, 103, 'email_password_reset_subject', 'Obnovte si heslo'),
(3, 1, 103, 'email_password_reset_title', 'Obnovte si heslo'),
(3, 1, 103, 'email_password_reset_warning', 'Z bezpečnostních důvodů platnost tohoto odkazu pro obnovení hesla vyprší za 1 hodinu.'),
(3, 1, 103, 'email_reset_button', 'Obnovit heslo'),
(3, 1, 103, 'email_verification_message1', 'Děkujeme za registraci u nás. Chcete-li dokončit registraci a aktivovat svůj účet, ověřte prosím svou e-mailovou adresu kliknutím na tlačítko níže:'),
(3, 1, 103, 'email_verification_note', 'Poznámka: Platnost tohoto ověřovacího odkazu vyprší za 24 hodin.'),
(3, 1, 103, 'email_verification_subject', 'Ověřte svou e-mailovou adresu'),
(3, 1, 103, 'email_verification_title', 'Ověřte svou e-mailovou adresu'),
(3, 1, 103, 'email_verify_button', 'Ověření e-mailové adresy'),
(3, 1, 103, 'email_warning_title', 'Důležité:') ON CONFLICT DO NOTHING;
-- +goose Down
-- Remove translations for this scope
DELETE FROM translations WHERE scope_id = 1;

View File

@@ -1,41 +1,65 @@
version: "3" version: "3"
vars:
PROJECT: nalu_b2b
BUILD_DIR: ./bin
REMOTE_USER: root
REMOTE_HOST: dc02-de
EMAIL_SMTP_PORT: 1025
EMAIL_SMTP_HOST: localhost
LOCAL_DB_SERVICE: db
LOCAL_DB_USER: nalu
LOCAL_DB_NAME: nalu
LOCAL_DB_PASSWORD: Maal12345678
DUMP_FILE_NAME:
sh: echo nalu_$(date +%Y_%m_%d__%H_%M_%S).sql
REMOTE_DB_SERVICE: "www_naluconcept_com_nalu_db"
REMOTE_DB_NAME: "presta"
REMOTE_DB_USER: "presta"
REMOTE_DB_PASS: "presta"
tasks: tasks:
reset: reset:
desc: Drop and recreate database desc: Drop and recreate database
cmds: cmds:
- | - >
docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d postgres -c \ docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb -u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}}
\"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='{{.DB_NAME}}' AND pid<>pg_backend_pid();\"" -e 'DROP DATABASE IF EXISTS {{.LOCAL_DB_NAME}}; CREATE DATABASE IF NOT EXISTS {{.LOCAL_DB_NAME}};'
- |
docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d postgres -c \"DROP DATABASE IF EXISTS {{.DB_NAME}};\""
- |
docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d postgres -c \"CREATE DATABASE {{.DB_NAME}};\""
restore: restore:
desc: Restore DB from file desc: Restore DB from file
aliases: [r] aliases: [r]
silent: true
preconditions: preconditions:
- sh: '[ -n "{{index .CLI_ARGS_LIST 0}}" ]' - sh: '[ -n "{{index .CLI_ARGS_LIST 0}}" ]'
msg: "Usage: task db:restore -- dump.sql" msg: "Usage: task db:restore -- dump.sql"
cmds: cmds:
- task db:reset - task db:reset
- | - |
cat {{index .CLI_ARGS_LIST 0}} | docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d {{.DB_NAME}}" {{if eq (len .CLI_ARGS_LIST) 0}}
- task db:migrate echo "Error: No file path provided."
exit 1
{{else}}
cat {{index .CLI_ARGS_LIST 0}} | docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb \
-u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}} \
{{.LOCAL_DB_NAME}}
{{end}}
- task db:mal
migrate: migrations_apply_localy:
desc: Apply SQL migrations aliases: [mal]
aliases: [m] desc: Apply Migrations to local database
silent: true
cmds: cmds:
- | - |
sed '/-- +goose Down/,$d' i18n/migrations/20260302163100_routes.sql | docker compose -p {{.PROJECT}} exec -T -e PGPASSWORD={{.DB_PASSWORD}} {{.DB_SERVICE_NAME}} psql -U {{.DB_USER}} -d {{.DB_NAME}} sed '/-- +goose Down/,$d' i18n/migrations/20260302163100_routes.sql | docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb -u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}} {{.LOCAL_DB_NAME}}
sed '/-- +goose Down/,$d' i18n/migrations/20260302163122_create_tables.sql | docker compose -p {{.PROJECT}} exec -T -e PGPASSWORD={{.DB_PASSWORD}} {{.DB_SERVICE_NAME}} psql -U {{.DB_USER}} -d {{.DB_NAME}} sed '/-- +goose Down/,$d' i18n/migrations/20260302163122_create_tables.sql | docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb -u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}} {{.LOCAL_DB_NAME}}
sed '/-- +goose Down/,$d' i18n/migrations/20260302163152_translations_backoffice.sql | docker compose -p {{.PROJECT}} exec -T -e PGPASSWORD={{.DB_PASSWORD}} {{.DB_SERVICE_NAME}} psql -U {{.DB_USER}} -d {{.DB_NAME}} sed '/-- +goose Down/,$d' i18n/migrations/20260302163152_translations_backoffice.sql | docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb -u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}} {{.LOCAL_DB_NAME}}
sed '/-- +goose Down/,$d' i18n/migrations/20260302163157_translations_backend.sql | docker compose -p {{.PROJECT}} exec -T -e PGPASSWORD={{.DB_PASSWORD}} {{.DB_SERVICE_NAME}} psql -U {{.DB_USER}} -d {{.DB_NAME}} sed '/-- +goose Down/,$d' i18n/migrations/20260302163157_translations_backend.sql | docker compose -p {{.PROJECT}} exec -T {{.LOCAL_DB_SERVICE}} mariadb -u {{.LOCAL_DB_USER}} --password={{.LOCAL_DB_PASSWORD}} {{.LOCAL_DB_NAME}}

View File

@@ -1,47 +0,0 @@
version: "3"
tasks:
pull:
desc: Pull remote Gitea DB into local DB
aliases: [gp]
silent: true
cmds:
- task db:reset
- |
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} \
"docker exec {{.GITEA_SERVICE}} pg_dump -U {{.GITEA_USER}} {{.GITEA_DB}}" | docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d {{.DB_NAME}}"
dump:
desc: Dump remote Gitea DB to file
aliases: [gd]
silent: true
cmds:
- |
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} "docker exec {{.GITEA_SERVICE}} pg_dump -U {{.GITEA_USER}} {{.GITEA_DB}}" > {{.DUMP_FILE_NAME}}
gitea_pull_db_to_file_ma_al_pl:
desc: Pull remote Gitea DB and upload to file.ma-al.pl
aliases: [rdbtfmpl]
silent: true
vars:
SERVER: https://file.ma-al.pl
TARGET_DIR: maal_internal/timetracker/dumps
TMP_DIR: /tmp
TOKEN:
sh: |
curl -s -u "{{.FILE_MAAL_PL_USER}}:{{.FILE_MAAL_PL_PASSWORD}}" "{{.SERVER}}/api/v2/user/token" | jq -r .access_token
preconditions:
- sh: '[ -n "{{.FILE_MAAL_PL_USER}}" ]'
msg: "Missing FILE_MAAL_PL_USER in .env"
- sh: '[ -n "{{.FILE_MAAL_PL_PASSWORD}}" ]'
msg: "Missing FILE_MAAL_PL_PASSWORD in .env"
cmds:
- |
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} "docker exec {{.GITEA_REMOTE_SERVICE}} pg_dump -U {{.GITEA_REMOTE_DB_USER}} {{.GITEA_REMOTE_DB_NAME}}" > {{.TMP_DIR}}/{{.DUMP_FILE_NAME}}
- >
curl -X POST "{{.SERVER}}/api/v2/user/files/upload?path={{.TARGET_DIR}}/{{.DUMP_FILE_NAME}}&mkdir_parents=true" -H "Authorization: Bearer {{.TOKEN}}" -H "Content-Type: application/x-tar" --data-binary "@{{.TMP_DIR}}/{{.DUMP_FILE_NAME}}"
- |
rm -f {{.TMP_DIR}}/{{.DUMP_FILE_NAME}}

65
taskfiles/nalu_db.yml Normal file
View File

@@ -0,0 +1,65 @@
version: "3"
tasks:
pull:
desc: Pull remote Gitea DB into local DB
aliases: [gp]
silent: true
cmds:
- task db:reset
- |
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} \
"docker exec {{.GITEA_SERVICE}} pg_dump -U {{.GITEA_USER}} {{.GITEA_DB}}" | docker compose -p {{.PROJECT}} exec -T {{.DB_SERVICE_NAME}} sh -c "PGPASSWORD='{{.DB_PASSWORD}}' psql -U {{.DB_USER}} -d {{.DB_NAME}}"
dump:
desc: Dump remote Gitea DB to file
aliases: [dump]
# silent: true
vars:
TEMP_DB_NAME: "temp_db_copy"
SERVER: https://file.ma-al.pl
TARGET_DIR: /maal_internal/nalu_b2b/dumps
TMP_DIR: /tmp
REMOTE_DB_USER: root
REMOTE_DB_PASS: Maal12345678
TOKEN:
sh: curl -s -X GET {{.SERVER}}/api/v2/user/token -u "{{.FILE_MAAL_PL_USER}}:{{.FILE_MAAL_PL_PASSWORD}}" | jq -r .access_token
cmds:
- >
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} "docker exec \$(docker ps -q -f name={{.REMOTE_DB_SERVICE}}) mariadb -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} -e 'CREATE DATABASE IF NOT EXISTS {{.TEMP_DB_NAME}}'"
- >
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}}
"docker exec \$(docker ps -q -f name={{.REMOTE_DB_SERVICE}}) bash -c \"mariadb-dump --routines --events --triggers -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} {{.REMOTE_DB_NAME}} | sed 's/DEFINER[ ]*=[ ]*[^ ]*//' | mariadb -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} {{.TEMP_DB_NAME}}\""
- >
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}}
"docker exec \$(docker ps -q -f name={{.REMOTE_DB_SERVICE}}) mariadb -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} {{.TEMP_DB_NAME}} -e \"
UPDATE IGNORE ps_customer SET email = REGEXP_REPLACE(email, '@.*$', '@ma-al.com');
UPDATE ps_configuration SET value = '${HOST_TO_SERVE}' WHERE name = 'PS_SHOP_DOMAIN';
UPDATE ps_configuration SET value = '${HOST_TO_SERVE}' WHERE name = 'PS_SHOP_DOMAIN_SSL';
UPDATE ps_configuration SET value = '${USE_SSL:-1}' WHERE name = 'PS_SSL_ENABLED';
UPDATE ps_configuration SET value = '1' WHERE name = 'PS_SSL_ENABLED_EVERYWHERE';
UPDATE ps_configuration SET value = '2' WHERE name = 'PS_MAIL_METHOD';
UPDATE ps_configuration SET value = 'admin@ma-al.com' WHERE name = 'PS_SHOP_EMAIL';
UPDATE ps_configuration SET value = 'maildev' WHERE name = 'PS_MAIL_SERVER';
UPDATE ps_configuration SET value = '' WHERE name = 'PS_MAIL_USER';
UPDATE ps_configuration SET value = '' WHERE name = 'PS_MAIL_PASSWD';
UPDATE ps_configuration SET value = 'off' WHERE name = 'PS_MAIL_SMTP_ENCRYPTION';
UPDATE ps_configuration SET value = '1025' WHERE name = 'PS_MAIL_SMTP_PORT';
UPDATE ps_configuration SET value = 'admin@ma-al.com' WHERE name = 'MA_MERCHANT_MAILS';
UPDATE ps_shop_url SET domain = '${HOST_TO_SERVE}', domain_ssl = '${HOST_TO_SERVE}' WHERE id_shop_url = '1';
UPDATE ps_configuration SET value='0' WHERE (ps_configuration.name = 'PS_SMARTY_CACHE');
UPDATE ps_configuration SET value='0' WHERE (ps_configuration.name = 'PS_CSS_THEME_CACHE');
UPDATE ps_configuration SET value='0' WHERE (ps_configuration.name = 'PS_JS_THEME_CACHE');
\""
- >
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}}
"docker exec \$(docker ps -q -f name={{.REMOTE_DB_SERVICE}}) mariadb-dump --routines --events --triggers -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} {{.TEMP_DB_NAME}}" > {{.TMP_DIR}}/{{.DUMP_FILE_NAME}}
- sed -i 's/DEFINER[ ]*=[ ]*[^ ]*//' {{.TMP_DIR}}/{{.DUMP_FILE_NAME}}
- >
curl -X POST "{{.SERVER}}/api/v2/user/files/upload?path={{.TARGET_DIR}}/{{.DUMP_FILE_NAME}}&mkdir_parents=true" -H "Authorization: Bearer {{.TOKEN}}" -H "Content-Type: application/x-tar" --data-binary "@{{.TMP_DIR}}/{{.DUMP_FILE_NAME}}"
- rm -rf {{.TMP_DIR}}/{{.DUMP_FILE_NAME}}
- >
ssh {{.REMOTE_USER}}@{{.REMOTE_HOST}} "docker exec \$(docker ps -q -f name={{.REMOTE_DB_SERVICE}}) mariadb -u {{.REMOTE_DB_USER}} --password={{.REMOTE_DB_PASS}} -e 'DROP DATABASE IF EXISTS {{.TEMP_DB_NAME}}'"