File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 88init :
99 - SET PATH=c:\php;%PATH%
1010
11+ environment :
12+ TEST_DATABASE_DSN : sqlite:///c:\projects\maker-bundle\tests\tmp\app.db
13+
1114install :
1215 - mkdir c:\php && cd c:\php
1316 - appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip
@@ -27,7 +30,7 @@ install:
2730 - echo opcache.enable_cli=1 >> php.ini-max
2831 - echo extension=php_openssl.dll >> php.ini-max
2932 - echo extension=php_apcu.dll >> php.ini-max
30- - echo extension=php_pdo_mysql .dll >> php.ini-max
33+ - echo extension=php_pdo_sqlite .dll >> php.ini-max
3134 - echo apc.enable_cli=1 >> php.ini-max
3235 - echo extension=php_intl.dll >> php.ini-max
3336 - echo extension=php_mbstring.dll >> php.ini-max
Original file line number Diff line number Diff line change @@ -104,7 +104,10 @@ public function configureDatabase(bool $createSchema = true): self
104104
105105 // this looks silly, but it's the only way to drop the database *for sure*,
106106 // as doctrine:database:drop will error if there is no database
107- $ this ->addPreMakeCommand ('php bin/console doctrine:database:create --env=test --if-not-exists ' );
107+ // also, skip for SQLITE, as it does not support --if-not-exists
108+ if (0 !== strpos (getenv ('TEST_DATABASE_DSN ' ), 'sqlite:// ' )) {
109+ $ this ->addPreMakeCommand ('php bin/console doctrine:database:create --env=test --if-not-exists ' );
110+ }
108111 $ this ->addPreMakeCommand ('php bin/console doctrine:database:drop --env=test --force ' );
109112
110113 $ this ->addPreMakeCommand ('php bin/console doctrine:database:create --env=test ' );
You can’t perform that action at this time.
0 commit comments