Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
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'
)
;
}