Importing data

I have an application that needs to have some tables initially
populated,
such as users, roles, and basic configuration data. The best thing I can
think of is to just use put together a script that uses activerecord to
load
the data. Is there a better way?

Chris

Hi !

2005/11/11, snacktime [email protected]:

I have an application that needs to have some tables initially populated,
such as users, roles, and basic configuration data. The best thing I can
think of is to just use put together a script that uses activerecord to load
the data. Is there a better way?

Migrations ? With migrations, you can do anything, including using
ActiveRecord instances to populate data. I often do that myself, as
well as use it to clean up records.

Hope that helps !
François

On 11/11/05, Francois B. [email protected] wrote:

Migrations ? With migrations, you can do anything, including using
ActiveRecord instances to populate data. I often do that myself, as
well as use it to clean up records.

Hope that helps !
François

Yes migrations looks like a good place to add initial data and anything
else
that might need to be added for upgrades. Thanks for the pointer.

Chris