860 B
860 B
Import legacy News into Skinbase
- Add these environment variables to your
.env(or set in your environment):
LEGACY_DB_HOSTLEGACY_DB_PORT(optional, default 3306)LEGACY_DB_DATABASELEGACY_DB_USERNAMELEGACY_DB_PASSWORD
- Run a dry-run to preview what will be imported:
php artisan news:import-legacy --dry-run --limit=100
- Run the actual import in batches:
php artisan news:import-legacy --start=0 --limit=500
php artisan news:import-legacy --start=500 --limit=500
Notes:
- The importer maps legacy
newsfields conservatively. You should review and adapt the mapping inapp/Console/Commands/ImportLegacyNewsCommand.phpbefore running a full import. - Author and category mapping is best-effort (falls back to user id 1 and null category). Adjust mapping logic if you want to preserve authors/categories.