Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
Migration1676367607RemoveIntegrationWriteAccessColumn example
$connection
= KernelLifecycleManager::
getConnection
(
)
;
$existed
=
$this
->
columnExists
(
$connection
)
;
if
(
!
$existed
)
{
$connection
->
executeStatement
(
' ALTER TABLE `integration` ADD COLUMN `write_access` TINYINT(1) DEFAULT 0 '
)
;
}
$migration
=
new
Migration1676367607RemoveIntegrationWriteAccessColumn
(
)
;
$migration
->
updateDestructive
(
$connection
)
;
$migration
->
updateDestructive
(
$connection
)
;
static
::
assertFalse
(
$this
->
columnExists
(
$connection
)
)
;
if
(
$existed
)
{
$connection
->
executeStatement
(
' ALTER TABLE `integration` ADD COLUMN `write_access` TINYINT(1) DEFAULT 0 '
)
;
}
}