We've been using a simple rake setup task with great success.
Something akin to:

rake app:setup app:fill app:fixtures

Where app:setup does the auto-migration (as well as sets up any folder
structures that need to be in place), app:fill tosses in the needed
data (like category roots, base users... anything the site needs as
far as data goes) and app:fixtures for loading in any development or
testing fixtures.

I'd shy away from using the BootLoader to add in any data because a
simple database structure change would prevent the site from booting
then.  That and it really feels like the wrong place for futzing with
the data-set.

Personal preference, though.  Whatever works ;-)
===
Adam French



On Fri, Sep 19, 2008 at 5:15 AM, Kless <[EMAIL PROTECTED]> wrote:
>
> Thanks Jonathan, but I was looking for anything as this:
> http://github.com/foysavas/freegovernment-core/tree/master/fixtures/populate_users.rb
>
> On 19 sep, 10:18, Jonathan Stott <[EMAIL PROTECTED]> wrote:
>> On Thu, 18 Sep 2008 15:29:54 -0700 (PDT)
>>
>> Kless <[EMAIL PROTECTED]> wrote:
>>
>> > Is possible add data to the DB after of define a table? I get that the
>> > table doesn't exist
>>
>> > And I tried also with a *Merb::BootLoader.after_app_loads* block but I
>> > get the same.
>>
>> Hi Kless
>>
>> We spoke about this yesterday but I was not very awake and so missed your 
>> problem.  You'll need to make sure you 'rake dm:db:automigrate' before you 
>> start the application so all your tables are there.  Once that is done, you 
>> should be able to add add data in the BootLoader block.
>>
>> Regards,
>> Jon
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to