Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
supportsSchemas example
$schemaDiff
=
$this
->
compareSchemas
(
$comparator
,
method_exists
(
$schemaManager
, 'introspectSchema'
)
?
$schemaManager
->
introspectSchema
(
)
:
$schemaManager
->
createSchema
(
)
,
$this
->
getSchema
(
)
)
;
$platform
=
$this
->driverConnection->
getDatabasePlatform
(
)
;
if
(
!
method_exists
(
SchemaDiff::
class
, 'getCreatedSchemas'
)
)
{
foreach
(
$schemaDiff
->
toSaveSql
(
$platform
)
as
$sql
)
{
$this
->driverConnection->
executeStatement
(
$sql
)
;
}
return
;
}
if
(
$platform
->
supportsSchemas
(
)
)
{
foreach
(
$schemaDiff
->
getCreatedSchemas
(
)
as
$schema
)
{
$this
->driverConnection->
executeStatement
(
$platform
->
getCreateSchemaSQL
(
$schema
)
)
;
}
}
if
(
$platform
->
supportsSequences
(
)
)
{
foreach
(
$schemaDiff
->
getAlteredSequences
(
)
as
$sequence
)
{
$this
->driverConnection->
executeStatement
(
$platform
->
getAlterSequenceSQL
(
$sequence
)
)
;
}
foreach
(
$schemaDiff
->
getCreatedSequences
(
)
as
$sequence
)
{