2

Is there any similar tool like Drush (for Drupal) but in this case for Symfony2

To keep synchronized two or more databases for differents users in local development.

  • 1
    Your best bet is [Doctrine Migrations](http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html) – sjagr Feb 17 '15 at 16:25

2 Answers2

0

Try Doctrine Migrations or phinx but I suggest doctrine migrations since you are using symfony

Rana Kolta
  • 71
  • 7
0

As Rena Kolta already mentioned, use Doctrine Migrations.

If you changed some entities and their database config, run:

app/console doctrine:migrations:diff

the differences are stored within the /app/DoctrineMigrations Folder and could be pushed into the repository. If the other user pulls the repository just run the command:

php app/console doctrine:database:drop --force
php app/console doctrine:database:create
php app/console doctrine:migrations:migrate --no-interaction
php app/console doctrine:schema:update --force

And i you have some sample data run the fixtures command:

php app/console doctrine:fixtures:load --no-interaction
Community
  • 1
  • 1
4lxndr
  • 357
  • 2
  • 12