3x-ui/sub
Ali Golzar 4d50320bc1 feat: Add MySQL database support
- Add MySQL database support with environment-based configuration
- Fix MySQL compatibility issue with 'key' column name
- Maintain SQLite as default database
- Add proper validation for MySQL configuration
- Test and verify compatibility with existing database
- Replaced raw SQL queries using JSON_EACH functions with standard GORM queries
- Modified functions to handle JSON parsing in Go code instead of database since JSON_EACH is not available on MySQL or MariaDB:
  - getAllEmails()
  - GetClientTrafficByID()
  - getFallbackMaster()
  - MigrationRemoveOrphanedTraffics()

The system now supports both MySQL and SQLite databases, with SQLite remaining as the default option. MySQL connection is only used when explicitly configured through environment variables.
2025-05-19 16:07:36 +03:30
..
default.json AsIs - freedom DS 2024-11-21 00:31:45 +03:30
sub.go feat: custom subscription title in panel (#2773) 2025-03-15 08:16:59 +01:00
subController.go fix: encoding subscription title in base64 2025-04-15 19:29:54 +07:00
subJsonService.go Refactor: Use any instead of interface{} 2025-03-12 20:43:43 +01:00
subService.go feat: Add MySQL database support 2025-05-19 16:07:36 +03:30