fix bug
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
|
||||
|
||||
class MigrateCommand extends BaseMigrateCommand
|
||||
{
|
||||
/**
|
||||
* Never auto-load database/schema/*.sql — it DROP TABLEs and wipes production data
|
||||
* when the migrations table is empty. Use baseline_migrations.sql on existing DBs.
|
||||
*/
|
||||
protected function prepareDatabase()
|
||||
{
|
||||
if (! $this->migrator->repositoryExists()) {
|
||||
$this->call('migrate:install', array_filter([
|
||||
'--database' => $this->option('database'),
|
||||
]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,11 @@ class SyncProductPrices extends Command
|
||||
{
|
||||
protected $signature = 'product:sync-prices';
|
||||
|
||||
protected $description = 'Sync variable product prices from external feeds (every ~30s via scheduler)';
|
||||
protected $description = 'Fetch zaarbox price board + sync product DB (scheduler: every 30s)';
|
||||
|
||||
public function handle(ProductPriceSyncService $syncService): int
|
||||
{
|
||||
// کران: همیشه فید تازه از zaarbox
|
||||
// کران: GET https://price.zaarbox.ir/api/free (یا zaarbox_api_url) → کش + UPDATE محصولات
|
||||
$syncService->syncAll(true);
|
||||
|
||||
return self::SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user