Migration1669124190AddDoctrineMessengerTable example


class Migration1669124190AddDoctrineMessengerTableTest extends TestCase
{
    public function testItCreatesTable(): void
    {
        $connection = KernelLifecycleManager::getConnection();
        $connection->executeStatement('DROP TABLE IF EXISTS `messenger_messages`');

        $migration = new Migration1669124190AddDoctrineMessengerTable();

        $migration->update($connection);
        // check that it can be executed multiple times         $migration->update($connection);

        $tableExists = (bool) $connection->fetchOne('SHOW TABLES LIKE "messenger_messages"');
        static::assertTrue($tableExists);
    }
}
Home | Imprint | This part of the site doesn't use cookies.