You are a developer and looking for Shopware projects?
Apply Now!
emptyDatabase example
$io
->
comment
(
'Drop database'
)
;
$database
->
dropDatabase
(
$dbConfig
[
'dbname'
]
)
;
break
;
case
'create':
$io
->
comment
(
'Create database'
)
;
$database
->
createDatabase
(
$dbConfig
[
'dbname'
]
)
;
break
;
case
'clear':
$io
->
comment
(
'Clear database'
)
;
$database
->
emptyDatabase
(
$dbConfig
[
'dbname'
]
)
;
break
;
case
'import':
$io
->
comment
(
'Import database'
)
;
$database
->
importFile
(
$dbConfig
[
'dbname'
]
,
$rootDir
. '/_sql/install/latest.sql'
)
;
$migrationManger
=
new
Manager
(
$connection
,
$rootDir
. '/_sql/migrations'
)
;
$migrationManger
->
run
(
)
;
break
;
case
'importDemodata':