Migration1679584289AddCustomerReviewCount example

try {
            $this->connection->executeStatement(
                'ALTER TABLE `customer` DROP COLUMN `review_count`;'
            );
        } catch (\Throwable) {
        }
    }

    public function testUpdate(): void
    {
        $migration = new Migration1679584289AddCustomerReviewCount();

        $this->createCustomer();
        $this->createProduct();
        $this->createReview($this->ids->create('review1'));
        $this->createReview($this->ids->create('review2'));
        $this->createReview($this->ids->create('review3'));

        $migration->update($this->connection);
        $migration->update($this->connection);

        $reviewCount = $this->connection->fetchOne(
            
Home | Imprint | This part of the site doesn't use cookies.