SUBSCRIBE VIA RSS


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.

Topics

TWITTER

Stack Overflow


The old fashioned way

RECENT TUNES

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 in  Web Development   |     |  delicious  Digg

3 Responses to “symfony propel-load-data”

  1. 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: http://symfony.stereodevelopment.com/sfLightWindow/

    By James M. on Jan 14, 2008

  2. I didn’t know about that second command, thanks

    By digitalbase on Jan 21, 2008

  3. symfony propel:data-load frontend

    current working command

    By alienv on Aug 20, 2008

Post a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word