Migration1670854818RemoveEventActionTable example

protected function setUp(): void
    {
        $this->connection = KernelLifecycleManager::getConnection();

        foreach (self::DELETED_TABLES as $table) {
            $this->connection->executeStatement('CREATE TABLE `' . $table . '` (`id` BINARY(16) NOT NULL, PRIMARY KEY (`id`))');
        }
    }

    public function testMigrationDeletesOldTables(): void
    {
        $migration = new Migration1670854818RemoveEventActionTable();
        $migration->updateDestructive($this->connection);
        $migration->updateDestructive($this->connection);

        static::assertFalse($this->connection->fetchOne('SHOW TABLES LIKE "event_action%"'));
    }
}
Home | Imprint | This part of the site doesn't use cookies.