mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-09 22:10:57 +08:00
feat: migrate store layer to GORM with PostgreSQL support
- Migrate all store packages from raw database/sql to GORM ORM - Add PostgreSQL support alongside SQLite - Move EncryptedString type to crypto package for cleaner architecture - Add automatic encryption/decryption for sensitive fields (API keys, secrets) - Fix PostgreSQL AutoMigrate conflicts by skipping existing tables - Fix duplicate /klines route registration - Update tests to use GORM database connections - Add database configuration support in config package
This commit is contained in:
13
.env.example
13
.env.example
@@ -55,3 +55,16 @@ TRANSPORT_ENCRYPTION=false
|
||||
# Telegram notifications (optional)
|
||||
# TELEGRAM_BOT_TOKEN=your-bot-token
|
||||
# TELEGRAM_CHAT_ID=your-chat-id
|
||||
|
||||
DB_TYPE=postgres
|
||||
DB_HOST=10.
|
||||
DB_PORT=5432
|
||||
DB_USER=nofx_user
|
||||
DB_PASSWORD=
|
||||
DB_NAME=nofx
|
||||
DB_SSLMODE=disable
|
||||
|
||||
|
||||
# 数据库配置 - SQLite(默认)
|
||||
DB_TYPE=sqlite
|
||||
DB_PATH=data/data.db
|
||||
Reference in New Issue
Block a user