From c61269db19d755b93c657c490dd66ea1a1962e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 20 Oct 2019 19:28:48 +0200 Subject: [PATCH] Disable foreign key checks for loading fixtures. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ba6cb11f..a4d595fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,10 @@ install: - php bin/console --env test doctrine:database:create --if-not-exists -n - php bin/console --env test doctrine:migrations:migrate -n # Load fixtures (we have to truncate database by ourselves or we get foreing key valiation errors - - php bin/console --env test doctrine:query:sql "SET foreign_key_checks = 0; TRUNCATE `groups`; TRUNCATE `users`;" + #- php bin/console --env test doctrine:query:sql "SET foreign_key_checks = 0; TRUNCATE `groups`; TRUNCATE `users`;" + - mysql -e "SET GLOBAL FOREIGN_KEY_CHECKS=0;" - php bin/console --env test doctrine:fixtures:load -n + - mysql -e "SET GLOBAL FOREIGN_KEY_CHECKS=1;" script: - php bin/phpunit