diff --git a/Makefile b/Makefile index 04517a637ea5dd17df17a1345c1764a97e5daf60..cae3e2e1bac7538f4c51514be1121cf7c5a0b4be 100644 --- a/Makefile +++ b/Makefile @@ -68,15 +68,6 @@ gitlab_api_logout: ## Logout to Gitlab API cd .gitlab/ci/Dockerfiles && ./90_gitlab-logout.sh .PHONY: gitlab_api_logout -## -##--- SYMFONY database -------------------------------------------------------- - -migration_database: ## Apply Doctrine migrations - cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:list --env=dev - cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:migrate -n --env=dev - cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:list --env=dev -.PHONY: migration_database - ## ##--- DOCKER ------------------------------------------------------------------ @@ -95,6 +86,22 @@ docker_with_empty-database: ## Run Docker containers (database, mailcatcher) wi cd "${WEBAPP_DIR}/docker" && docker-compose up .PHONY: docker_with_empty-database +## +##--- DEV environment -------------------------------------------------------- + +migration_database_env_dev: ## Apply Doctrine migrations (DEV environment) + cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:list --env=dev + cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:migrate -n --env=dev + cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:list --env=dev +.PHONY: migration_database_env_dev + +load_fixture_env_dev: ## Clean up database and load fixture (DEV environment) + cd "${WEBAPP_DIR}" && bin/console doctrine:database:drop --force --env=dev || true + cd "${WEBAPP_DIR}" && bin/console doctrine:database:create --env=dev + cd "${WEBAPP_DIR}" && bin/console doctrine:migrations:migrate -n --env=dev + cd "${WEBAPP_DIR}" && bin/console doctrine:fixtures:load -n --env=dev +.PHONY: load_fixture_env_dev + ## ##--- TESTS -------------------------------------------------------------------