mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-01 20:10:35 +01:00
# Description of Changes This PR introduces comprehensive database backup and restore management for embedded H2 databases directly within the admin UI, along with a corrected backend condition for H2 detection. ### What was changed - Fixed `H2SQLCondition` logic so embedded H2 is correctly detected when custom databases are disabled. - Updated and expanded unit tests to reflect the corrected H2 enablement behavior. - Added a new **Backups & Restore** section to the Admin Database settings UI. - Implemented UI features to: - Create H2 database backups - List available backup files with metadata - Download, import, and delete existing backups - Upload and import `.sql` backup files with a confirmation code safety step - Added a new frontend service (`databaseManagementService`) to encapsulate database management API calls. - Extended English (en-GB) translations for all new database backup and restore UI elements. ### Why the change was made - Embedded H2 is the default database when no custom database is configured, but this was not consistently reflected in backend conditions. - Administrators need a safe, UI-driven way to manage H2 backups without manual filesystem access. - The new UI improves operability, safety (confirmation code on import), and transparency (version and status badges). <img width="1920" height="1080" alt="image" src="https://github.com/user-attachments/assets/15869b9c-fa86-4b31-ac9b-8e6424138b73" /> <img width="1920" height="1032" alt="image" src="https://github.com/user-attachments/assets/8668dc07-0384-40f0-91e1-c6973c1ce535" /> Closes #5515 --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details. |
||
|---|---|---|
| .. | ||
| common | ||
| core | ||
| proprietary | ||
| allowed-licenses.json | ||