From 420fa7dd889595c451a768ac44230df0691e9e5a Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Fri, 1 Apr 2022 18:02:26 +0200 Subject: [PATCH] Another try to fix travis --- .travis.yml | 1 + ..._10_20_211115_add_group_id_column_to_twofaccounts_table.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index effae0b4..99011b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ before_script: script: - 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 after_success: diff --git a/database/migrations/2020_10_20_211115_add_group_id_column_to_twofaccounts_table.php b/database/migrations/2020_10_20_211115_add_group_id_column_to_twofaccounts_table.php index 25a5d57d..211fbbf6 100644 --- a/database/migrations/2020_10_20_211115_add_group_id_column_to_twofaccounts_table.php +++ b/database/migrations/2020_10_20_211115_add_group_id_column_to_twofaccounts_table.php @@ -33,7 +33,8 @@ class AddGroupIdColumnToTwofaccountsTable extends Migration { Schema::table('twofaccounts', function (Blueprint $table) { // 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']); } }