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 @@ public function down() { 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']); } }