PartKeepr\CoreBundle\DoctrineMigrations\Version20151002183125::up PHP Method

up() public method

public up ( Doctrine\DBAL\Schema\Schema $schema )
$schema Doctrine\DBAL\Schema\Schema
    public function up(Schema $schema)
    {
        $this->performDatabaseUpgrade();
        $partRepository = $this->getEM()->getRepository('PartKeeprPartBundle:Part');
        $parts = $partRepository->findAll();
        foreach ($parts as $part) {
            $part->recomputeStockLevels();
        }
        $this->getEM()->flush();
    }
Version20151002183125