Simplify database support to SQLite only

Removed PostgreSQL and MySQL support to reduce complexity:
- Removed postgres and mysql drivers from go.mod
- Simplified database.Initialize() to only use SQLite
- Simplified DatabaseConfig struct (removed Driver, Host, Port, User, Password, SSLMode)
- Removed GetDSN() method from config
- Removed --db CLI flag (only --db-name remains for specifying SQLite file path)
- Updated .env.example to remove MySQL/PostgreSQL options
- Updated README_GOLANG.md to reflect SQLite-only support
- Ran go mod tidy to clean up dependencies

This makes the application simpler to deploy and maintain, with no
external database dependencies required.
This commit is contained in:
Claude 2025-11-05 11:23:40 +00:00
parent 4aaa889634
commit 65f1265555
No known key found for this signature in database
7 changed files with 44 additions and 107 deletions

View file

@ -3,27 +3,9 @@ SERVER_HOST=0.0.0.0
SERVER_PORT=3000
GIN_MODE=debug
# Database Configuration
DB_DRIVER=sqlite
# Database Configuration (SQLite)
DB_NAME=tracks.db
# For PostgreSQL:
# DB_DRIVER=postgres
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=tracks
# DB_USER=tracks
# DB_PASSWORD=tracks
# DB_SSLMODE=disable
# For MySQL:
# DB_DRIVER=mysql
# DB_HOST=localhost
# DB_PORT=3306
# DB_NAME=tracks
# DB_USER=tracks
# DB_PASSWORD=tracks
# Authentication Configuration
JWT_SECRET=your-secret-key-change-this-in-production
TOKEN_EXPIRY_HOURS=168