What's New
- Added support for automatic database migration via
AUTO_MIGRATE=truein the.envfile. - The migration script automatically runs
auth-migrations.sqlif theuserstable does not exist. - After a successful migration, the
AUTO_MIGRATEflag is automatically set to false in the.env. - All operations are logged using
LoggerFactory, including failures and inconsistencies. - Error logs are sent to Telegram (if configured).
Structure
- New file:
bootstrap/auto_migrate.php - The file
core/migrations/auth-migrations.sqlis expected to contain the initial SQL schema. - Table existence is checked using
SHOW TABLES LIKE 'users'.
Security
- No
echoor HTML/CLI output is used. All feedback is handled through internal logging. - Logs include IP address, user agent, URI, and UID for full traceability.
How to Use
-
Add the following to your
.envfile:AUTO_MIGRATE=true