mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 09:58:22 +08:00
6426696258
Major database migration to modernize the AI trading system:
• **Database Migration**:
- Add PostgreSQL 15 and Redis 7 services to docker-compose
- Create comprehensive PostgreSQL schema with proper indexes and triggers
- Implement DatabaseInterface for multi-database support
- Add automatic environment-based database selection
• **Infrastructure**:
- PostgreSQL: ACID transactions, better concurrency, JSON support
- Redis: High-performance caching layer (prepared for future use)
- Docker services with health checks and dependency management
- Persistent volumes for data safety
• **Code Refactoring**:
- Abstract database operations through DatabaseInterface
- Implement PostgreSQL-specific operations with proper syntax
- Update all SQL queries to support both SQLite and PostgreSQL
- Fix foreign key constraints and data type conversions
• **Migration Tools**:
- Automated data migration script from SQLite to PostgreSQL
- Complete backup and restore procedures
- One-click migration script with validation
• **Compatibility**:
- Backward compatible with existing SQLite deployments
- Environment variable driven database selection
- Preserved all existing functionality and data
🎯 Benefits: Better performance, scalability, and reliability for production deployments
83 lines
3.5 KiB
Modula-2
83 lines
3.5 KiB
Modula-2
module nofx
|
|
|
|
go 1.25.0
|
|
|
|
require (
|
|
github.com/adshao/go-binance/v2 v2.8.7
|
|
github.com/ethereum/go-ethereum v1.16.5
|
|
github.com/gin-gonic/gin v1.11.0
|
|
github.com/golang-jwt/jwt/v5 v5.2.0
|
|
github.com/google/uuid v1.6.0
|
|
github.com/gorilla/websocket v1.5.3
|
|
github.com/lib/pq v1.10.9
|
|
github.com/mattn/go-sqlite3 v1.14.32
|
|
github.com/pquerna/otp v1.4.0
|
|
github.com/sonirico/go-hyperliquid v0.17.0
|
|
golang.org/x/crypto v0.42.0
|
|
)
|
|
|
|
require (
|
|
github.com/armon/go-radix v1.0.0 // indirect
|
|
github.com/bitly/go-simplejson v0.5.0 // indirect
|
|
github.com/bits-and-blooms/bitset v1.24.0 // indirect
|
|
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
|
|
github.com/bytedance/sonic v1.14.0 // indirect
|
|
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
|
github.com/cloudwego/base64x v0.1.6 // indirect
|
|
github.com/consensys/gnark-crypto v0.19.0 // indirect
|
|
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
|
|
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
|
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
|
|
github.com/elastic/go-sysinfo v1.15.4 // indirect
|
|
github.com/elastic/go-windows v1.0.2 // indirect
|
|
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
|
|
github.com/ethereum/go-verkle v0.2.2 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
|
github.com/gin-contrib/sse v1.1.0 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.27.0 // indirect
|
|
github.com/goccy/go-json v0.10.4 // indirect
|
|
github.com/goccy/go-yaml v1.18.0 // indirect
|
|
github.com/holiman/uint256 v1.3.2 // indirect
|
|
github.com/joho/godotenv v1.5.1 // indirect
|
|
github.com/josharian/intern v1.0.0 // indirect
|
|
github.com/jpillora/backoff v1.0.0 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/mailru/easyjson v0.9.1 // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/prometheus/procfs v0.17.0 // indirect
|
|
github.com/quic-go/qpack v0.5.1 // indirect
|
|
github.com/quic-go/quic-go v0.54.0 // indirect
|
|
github.com/rs/zerolog v1.34.0 // indirect
|
|
github.com/shopspring/decimal v1.4.0 // indirect
|
|
github.com/sonirico/vago v0.9.0 // indirect
|
|
github.com/sonirico/vago/lol v0.0.0-20250901170347-2d1d82c510bd // indirect
|
|
github.com/supranational/blst v0.3.16 // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.3.0 // indirect
|
|
github.com/valyala/fastjson v1.6.4 // indirect
|
|
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
|
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
|
go.elastic.co/apm/module/apmzerolog/v2 v2.7.1 // indirect
|
|
go.elastic.co/apm/v2 v2.7.1 // indirect
|
|
go.elastic.co/fastjson v1.5.1 // indirect
|
|
go.uber.org/mock v0.5.0 // indirect
|
|
golang.org/x/arch v0.20.0 // indirect
|
|
golang.org/x/mod v0.27.0 // indirect
|
|
golang.org/x/net v0.43.0 // indirect
|
|
golang.org/x/sync v0.17.0 // indirect
|
|
golang.org/x/sys v0.36.0 // indirect
|
|
golang.org/x/text v0.29.0 // indirect
|
|
golang.org/x/tools v0.36.0 // indirect
|
|
google.golang.org/protobuf v1.36.9 // indirect
|
|
howett.net/plist v1.0.1 // indirect
|
|
)
|