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

View File

@@ -2,26 +2,27 @@
-- 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'),
(301, 'validate_error'),
(302, 'repo_chart'),
(303, 'verify_email') ON CONFLICT DO NOTHING;
INSERT IGNORE INTO b2b_components (id, name) VALUES
(1, 'be'),
(2, 'login'),
(3, 'verify_email'),
(100, 'email'),
(101, 'error'),
(102, 'auth'),
(103, 'email'),
(300, 'general'),
(301, 'validate_error'),
(302, 'repo_chart'),
(303, 'verify_email');
-- Scope
INSERT INTO scopes (id, name) VALUES (1, 'Backend') ON CONFLICT DO NOTHING;
INSERT IGNORE INTO b2b_scopes (id, name) VALUES
(1, 'Backend');
-- Translations
-- 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_not_loaded', 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_ok', 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
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_not_loaded', 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_ok', 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
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_quarter_attribute', 'nieprawidłowy atrybut quarter'),
(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_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;
(3, 1, 101, 'err_verification_token_expired', 'platnost ověřovacího tokenu vypršela');
-- 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_logged_out_successfully', 'wylogowano pomyślnie'),
(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_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;
(3, 1, 102, 'auth_registration_successful', 'Registrace úspěšná, prosím ověřte svůj e-mail');
-- 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_footer', 'Wszelkie prawa zastrzeżone.'),
(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_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;
(3, 1, 103, 'email_warning_title', 'Důležité:');
-- +goose Down
-- Remove translations for this scope