fix migrations
This commit is contained in:
parent
6ebd62a71e
commit
a6b14cce7f
@ -131,7 +131,7 @@ class ZtmGdanskDataUpdateSubscriber implements EventSubscriberInterface
|
||||
return StopEntity::createFromArray([
|
||||
'id' => $this->ids->generate($provider, $stop['stopId']),
|
||||
'name' => trim($stop['stopName'] ?? $stop['stopDesc']),
|
||||
'variant' => trim($stop['zoneName'] == 'Gdańsk' ? $stop['subName'] : null),
|
||||
'variant' => trim($stop['zoneName'] == 'Gdańsk' ? $stop['stopCode'] : null),
|
||||
'latitude' => $stop['stopLat'],
|
||||
'longitude' => $stop['stopLon'],
|
||||
'onDemand' => (bool)$stop['onDemand'],
|
||||
|
@ -6,7 +6,6 @@ use App\Event\DataUpdateEvent;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Kadet\Functional\Predicats as p;
|
||||
|
||||
class DataUpdater
|
||||
{
|
||||
@ -33,7 +32,7 @@ class DataUpdater
|
||||
{
|
||||
$schema = $this->em->getConnection()->getSchemaManager();
|
||||
collect($schema->listTables())->reject(function (Table $schema) {
|
||||
return $schema->getName() === 'migrations';
|
||||
return $schema->getName() === 'migration_versions';
|
||||
})->each([$schema, 'dropAndCreateTable']);
|
||||
|
||||
$this->dispatcher->dispatch(self::UPDATE_EVENT, new DataUpdateEvent());
|
||||
|
Loading…
Reference in New Issue
Block a user