|
|
@ -40,7 +40,7 @@ class MigrateMarketData extends Command |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
// get old data from old table
|
|
|
// get old data from old table
|
|
|
$oldData = DB::table('ims_cjdc_market')->get(); |
|
|
|
|
|
|
|
|
$oldData = DB::table('ims_cjdc_market_new')->get(); |
|
|
|
|
|
|
|
|
$bar = $this->output->createProgressBar(count($oldData)); |
|
|
$bar = $this->output->createProgressBar(count($oldData)); |
|
|
$bar->start(); |
|
|
$bar->start(); |
|
|
@ -49,6 +49,7 @@ class MigrateMarketData extends Command |
|
|
foreach ($oldData as $key => $value) { |
|
|
foreach ($oldData as $key => $value) { |
|
|
$coordinates = explode(',', $value->coordinates); |
|
|
$coordinates = explode(',', $value->coordinates); |
|
|
$newData[] = [ |
|
|
$newData[] = [ |
|
|
|
|
|
'id' => $value->id, |
|
|
'mp_id' => $value->mp_id ?? 0, |
|
|
'mp_id' => $value->mp_id ?? 0, |
|
|
'name' => $value->name ?? '', |
|
|
'name' => $value->name ?? '', |
|
|
'logo' => $value->logo ?? '', |
|
|
'logo' => $value->logo ?? '', |
|
|
|