Skip to content
Snippets Groups Projects
Commit 9259fd7a authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

feat(dev): allow clean up database and load fixture (DEV environment)

parent c84847b2
No related branches found
No related tags found
No related merge requests found
......@@ -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 -------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment