restoreAssociations example

$this->addColumn();
        }

        $migration = new Migration1679581138RemoveAssociationFields();
        $migration->updateDestructive($this->connection);
        $migration->updateDestructive($this->connection);

        static::assertFalse($this->columnExists());

        if ($existed) {
            $this->addColumn();
            $this->restoreAssociations($tableData);
        }
    }

    /** * @return array<array<string, string>> */
    private function fetchData(): array
    {
        return $this->connection->fetchAllAssociative('SELECT * FROM media_default_folder');
    }

    
Home | Imprint | This part of the site doesn't use cookies.