Skip to content

Instantly share code, notes, and snippets.

@mdarse
Created August 3, 2012 12:43
Show Gist options
  • Save mdarse/3247343 to your computer and use it in GitHub Desktop.
Save mdarse/3247343 to your computer and use it in GitHub Desktop.
Symfony 2 reset
#!/bin/bash
read -p "The database and all data associated will be deleted, press any key to continue... (Ctrl+C to abort)"
echo "=== Installing dependencies (will warm-up cache too)"
composer install
echo "=== Suppression de la base de donnée actuelle"
app/console doctrine:database:drop --force
echo "=== Création d'une nouvelle base de donnée"
app/console doctrine:database:create
echo "=== Migration de la base de donnée vers le dernier schéma connu"
app/console doctrine:migration:migrate --no-interaction
echo "=== Chargement des données de départ"
app/console doctrine:fixtures:load
echo "=== Reset terminé"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment