Another try to fix travis

This commit is contained in:
Bubka 2022-04-01 18:02:26 +02:00
parent 5503a3b827
commit 420fa7dd88
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ before_script:
script: script:
- DATABASE=mysql vendor/bin/phpunit -c phpunit-mysql.xml - DATABASE=mysql vendor/bin/phpunit -c phpunit-mysql.xml
- php artisan config:clear
- DATABASE=sqlite vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml - DATABASE=sqlite vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml
after_success: after_success:

View File

@ -33,7 +33,8 @@ public function down()
{ {
Schema::table('twofaccounts', function (Blueprint $table) { Schema::table('twofaccounts', function (Blueprint $table) {
// cannot drop foreign keys in SQLite: // cannot drop foreign keys in SQLite:
if ('sqlite' !== config('database.default')) { $driver = Schema::connection($this->getConnection())->getConnection()->getDriverName();
if ('sqlite' !== $driver) {
$table->dropForeign(['group_id']); $table->dropForeign(['group_id']);
} }
} }