Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getNextMigrationForVersion example
if
(
$offset
== 0
)
{
$this
->migrationManager->
createSchemaTable
(
)
;
}
$currentVersion
=
$this
->migrationManager->
getCurrentVersion
(
)
;
if
(
!
$totalCount
)
{
$totalCount
= \
count
(
$this
->migrationManager->
getMigrationsForVersion
(
$currentVersion
)
)
;
}
$migration
=
$this
->migrationManager->
getNextMigrationForVersion
(
$currentVersion
)
;
if
(
$migration
=== null
)
{
return
new
FinishResult
(
$offset
,
$totalCount
)
;
}
try
{
$this
->migrationManager->
apply
(
$migration
, AbstractMigration::MODUS_UPDATE
)
;
}
catch
(
Exception
$e
)
{
$reflection
=
new
ReflectionClass
(
\
get_class
(
$migration
)
)
;
$classFile
=
$reflection
->
getFileName
(
)
;