Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isBasicDataMigration example
$connection
=
$this
->
setupDB
(
$orgConnection
)
;
$migrationCollection
=
$this
->
collectMigrations
(
)
;
foreach
(
$migrationCollection
->
getMigrationSteps
(
)
as
$_className
=>
$migration
)
{
try
{
$migration
->
update
(
$connection
)
;
}
catch
(
\Exception
$e
)
{
static
::
fail
(
$_className
. \PHP_EOL .
$e
->
getMessage
(
)
)
;
}
if
(
$this
->
isBasicDataMigration
(
$_className
)
)
{
$deLiLocale
=
$connection
->
fetchAssociative
(
'SELECT * FROM `locale` WHERE `code` = :code',
[
'code' => 'de-LI',
]
)
;
static
::
assertIsArray
(
$deLiLocale
)
;
$connection
->
update
(
'language',
[