1
Is there any place in Symfony reserved for me to provide scripts or run a class that populates the database with the initial information I need?
The ideal would be during the first run and each update. If it exists as I use?
1
Is there any place in Symfony reserved for me to provide scripts or run a class that populates the database with the initial information I need?
The ideal would be during the first run and each update. If it exists as I use?
2
There is a feature in Doctrine called Doctrine Migrations. You can select your database and even add an initial load when executing the "migrate" command. There is a Symfony2 Bundle for this: http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html
I hope I’ve helped.
Browser other questions tagged php database symfony
You are not signed in. Login or sign up in order to post.
What you are looking for is called Migrations, Symfony uses Doctrine as Object Relational Mapper, if you are using Doctrine you can use Bundle http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html
– Pedro Henrique