Tuesday, March 11, 2008

symfony propel-load-data

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

No comments: