1021 B
1021 B
MySQL migration
MicroLearn uses MySQL 8.4 in development, tests, CI, production, and on-premise deployments.
One-time local migration from SQLite
-
Back up
backend/database/database.sqliteand stop API/queue processes that can write to it. -
Create an empty MySQL database and a least-privilege application user using
utf8mb4. -
Set the MySQL
DB_*values inbackend/.env. -
Clear cached configuration and import the legacy data:
cd backend php artisan config:clear php artisan db:import-sqlite database/database.sqlite
The importer applies all migrations to MySQL, requires the destination application tables to be empty, copies matching columns in batches, and leaves the SQLite source unchanged. Keep the SQLite backup until record counts and application smoke tests have been verified.
Verification
php artisan migrate:status
php artisan test
Production backup and restore use mysqldump and mysql through scripts/backup.sh and scripts/restore.sh.