Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.


Stack Overflow

The old fashioned way


January 14, 2008 – 2:55pm symfony propel-load-data

Loading data from fixtures can be extremely useful to pre-populate your database so you have something to test and code with. I frequently use the propel-load-data task in two ways, the first when altering the schema, and the second to add some new data on top of whats in the database.

This will rebuild your db and model from schema.yml, insert the new structure into your db, and load data from the fixtures in /data/fixtures:

./symfony propel-build-all-load frontend

To load in additional data from a specific fixture file, you can use this command:

./symfony propel-load-data frontend dev data/fixtures/[filename].yml append
Posted by in  Web Development   |  

3 Responses to symfony propel-load-data

  1. James M. says:

    Do you know by any chance how to prevent the task from loading a specific fixture file? I’d like to leave out the fixtures.yml from sfGuardPlugin but can’t find another way than deleting it.

    Oh, and there is a broken link on your sfLightWindowPlugin page:

  2. digitalbase says:

    I didn’t know about that second command, thanks

  3. alienv says:

    symfony propel:data-load frontend

    current working command