[PR #658] [MERGED] feature: support init db in admin portal #682

Closed
opened 2026-02-26 21:32:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658
Author: @dreamhunter2333
Created: 5/20/2025
Status: Merged
Merged: 5/20/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 2d8254c feature: support init db in admin portal

📊 Changes

15 files changed (+1899 additions, -1811 deletions)

View changed files

📝 frontend/package.json (+3 -3)
📝 frontend/pnpm-lock.yaml (+310 -567)
📝 frontend/src/views/Admin.vue (+9 -0)
frontend/src/views/admin/DatabaseManager.vue (+126 -0)
📝 pages/package.json (+1 -1)
📝 vitepress-docs/docs/zh/guide/actions/d1.md (+14 -0)
📝 vitepress-docs/docs/zh/guide/ui/d1.md (+5 -1)
📝 vitepress-docs/package.json (+2 -2)
📝 vitepress-docs/pnpm-lock.yaml (+436 -436)
📝 worker/package.json (+7 -6)
📝 worker/pnpm-lock.yaml (+816 -794)
worker/src/admin_api/db_api.ts (+156 -0)
📝 worker/src/admin_api/index.ts (+6 -0)
📝 worker/src/constants.ts (+4 -0)
📝 worker/src/telegram_api/telegram.ts (+4 -1)

📄 Description

PR Type

Enhancement, Documentation, Bug fix


Description

  • Added database initialization and migration support in the admin portal.

  • Implemented backend APIs for database management (initialize, migrate, version).

  • Updated documentation for database setup and schema updates.

  • Fixed Telegram bot message formatting issue with Markdown support.


Changes walkthrough 📝

Relevant files
Enhancement
5 files
DatabaseManager.vue
Add UI for database initialization and migration                 
+126/-0 
Admin.vue
Integrate DatabaseManager component into admin portal       
+9/-0     
db_api.ts
Implement database initialization and migration APIs         
+156/-0 
index.ts
Register database APIs in admin API routes                             
+6/-0     
constants.ts
Add constants for database versioning                                       
+4/-0     
Bug fix
1 files
telegram.ts
Fix Telegram bot message formatting with Markdown               
+4/-1     
Dependencies
4 files
package.json
Update frontend dependencies                                                         
+3/-3     
package.json
Update worker dependencies                                                             
+7/-6     
package.json
Update Pages dependencies                                                               
+1/-1     
package.json
Update VitePress dependencies                                                       
+2/-2     
Documentation
2 files
d1.md
Add documentation for database initialization and updates
+14/-0   
d1.md
Update UI guide for database initialization                           
+5/-1     
Additional files
3 files
pnpm-lock.yaml +310/-567
pnpm-lock.yaml +436/-436
pnpm-lock.yaml +816/-794

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.

  • 🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 5/20/2025 **Status:** ✅ Merged **Merged:** 5/20/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`2d8254c`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/2d8254c5ce90a663fad45ee65e6faec2e82c555f) feature: support init db in admin portal ### 📊 Changes **15 files changed** (+1899 additions, -1811 deletions) <details> <summary>View changed files</summary> 📝 `frontend/package.json` (+3 -3) 📝 `frontend/pnpm-lock.yaml` (+310 -567) 📝 `frontend/src/views/Admin.vue` (+9 -0) ➕ `frontend/src/views/admin/DatabaseManager.vue` (+126 -0) 📝 `pages/package.json` (+1 -1) 📝 `vitepress-docs/docs/zh/guide/actions/d1.md` (+14 -0) 📝 `vitepress-docs/docs/zh/guide/ui/d1.md` (+5 -1) 📝 `vitepress-docs/package.json` (+2 -2) 📝 `vitepress-docs/pnpm-lock.yaml` (+436 -436) 📝 `worker/package.json` (+7 -6) 📝 `worker/pnpm-lock.yaml` (+816 -794) ➕ `worker/src/admin_api/db_api.ts` (+156 -0) 📝 `worker/src/admin_api/index.ts` (+6 -0) 📝 `worker/src/constants.ts` (+4 -0) 📝 `worker/src/telegram_api/telegram.ts` (+4 -1) </details> ### 📄 Description ### **PR Type** Enhancement, Documentation, Bug fix ___ ### **Description** - Added database initialization and migration support in the admin portal. - Implemented backend APIs for database management (initialize, migrate, version). - Updated documentation for database setup and schema updates. - Fixed Telegram bot message formatting issue with Markdown support. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>5 files</summary><table> <tr> <td><strong>DatabaseManager.vue</strong><dd><code>Add UI for database initialization and migration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-0b7a11f6b235b04482265301cd2d06639dbabbb09712d439b6eb706a7227e9d1">+126/-0</a>&nbsp; </td> </tr> <tr> <td><strong>Admin.vue</strong><dd><code>Integrate DatabaseManager component into admin portal</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-78137b072a7fa52c6d503efb9a3d32c07da5073dd5ca32ac48b1402ac2481a55">+9/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>db_api.ts</strong><dd><code>Implement database initialization and migration APIs</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-b2b74d448d9a04d5b6118262d99440206d6b342cb4955730aa50ed9f35923e4c">+156/-0</a>&nbsp; </td> </tr> <tr> <td><strong>index.ts</strong><dd><code>Register database APIs in admin API routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-b470c4c47ce4a700cd8aac644d07d8a747d439bb6d69e9392a198b3a931fe2e7">+6/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>constants.ts</strong><dd><code>Add constants for database versioning</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-cab08ba19c1499ed426fc4918a5613e22eb95c3427c7467ce330f5ee0d69d01e">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Bug fix</strong></td><td><details><summary>1 files</summary><table> <tr> <td><strong>telegram.ts</strong><dd><code>Fix Telegram bot message formatting with Markdown</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-a62d9c6ad0b04691396db4eecb38680ea80a2690f021e18baa6012ad525a27d3">+4/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>4 files</summary><table> <tr> <td><strong>package.json</strong><dd><code>Update frontend dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+3/-3</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Update worker dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-89dc6f41a53ce13f2da5a00dd34868762e6cd0df46eddc9f5c3c4510b1493870">+7/-6</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Update Pages dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-74314f72f6616d400be4cb0d161867d8148f23c22d4c12c7188aedb129c00c59">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Update VitePress dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-3adbfbfaa65ecc60f48c8d009a52c697d4c80d61ee887799df22407fcb73f380">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>d1.md</strong><dd><code>Add documentation for database initialization and updates</code></dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-2bac285c3d922850a0aed820179fc4446251bf54673863803a2e632d5210d050">+14/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td><strong>d1.md</strong><dd><code>Update UI guide for database initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-5cf2f75d9c7c3921a47c59b59069cb4d33f2221b2928070915f35b3606545353">+5/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Additional files</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>pnpm-lock.yaml</strong></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-41b1ff3a74ba81fa74c8dd225d66d81573be3f2990e1d98b9b09798b147d40a8">+310/-567</a></td> </tr> <tr> <td><strong>pnpm-lock.yaml</strong></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-655c1410f6eacceaa9003212a9f840a660ace35e32e60d792be3640ec774af6f">+436/-436</a></td> </tr> <tr> <td><strong>pnpm-lock.yaml</strong></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/658/files#diff-b40cf923090a5fb5f6cc0d6ce716c560645419d762871abb50383fdb423288c6">+816/-794</a></td> </tr> </table></details></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:25 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#682
    No description provided.