[PR #2645] [MERGED] Enhance database initialization in db.go #5221

Closed
opened 2026-10-31 20:45:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/2645
Author: @izzzzzi
Created: 1/19/2025
Status: ✅ Merged
Merged: 1/21/2025
Merged by: @MHSanaei

Base: main ← Head: main


📝 Commits (1)

  • 4dce28d Enhance database initialization in db.go

📊 Changes

1 file changed (+24 additions, -2 deletions)

View changed files

📝 database/db.go (+24 -2)

📄 Description

  • Updated GORM configuration to skip default transactions and prepare statements.
  • Modified the database connection string to include caching and journal mode settings.
  • Executed several PRAGMA statements to optimize SQLite performance and enable foreign key support.

These changes improve database handling and performance in the application.


🔄 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/MHSanaei/3x-ui/pull/2645 **Author:** [@izzzzzi](https://github.com/izzzzzi) **Created:** 1/19/2025 **Status:** ✅ Merged **Merged:** 1/21/2025 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`4dce28d`](https://github.com/MHSanaei/3x-ui/commit/4dce28dfb1e643cf4eb5ce1707c075b71ac00f02) Enhance database initialization in db.go ### 📊 Changes **1 file changed** (+24 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `database/db.go` (+24 -2) </details> ### 📄 Description - Updated GORM configuration to skip default transactions and prepare statements. - Modified the database connection string to include caching and journal mode settings. - Executed several PRAGMA statements to optimize SQLite performance and enable foreign key support. These changes improve database handling and performance in the application. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:45:32 +07: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
MHSanaei/3x-ui#5221
No description provided.