I'm of course speaking out of turn probably but that's never stopped me
before.....

I believe you would want to run

.apply(DB, '.', 1, 0) - this will load the first migration - the zero
indicates no current state (i.e. empty db)
.apply(DB, '.', 2, 1) - this will load the second migration - again the 1
indicates you are currently at "level 1"

As far as what files to use - the rdocs (http://sequel.rubyforge.org/rdoc/)
gives a nice way to walk through the code. The short answer is there is a
regex which looks, in essence, for *_*.rb and uses those files as the
migration files. You should be ok with having everything in the same
directory.

Jeremy will surely correct me where I've fallen off the path :)

John

On Tue, Mar 17, 2009 at 3:20 PM, Scott LaBounty <[email protected]> wrote:

> Jeremy,
>
> I guess what I was looking to do was start with no database (i.e. I removed
> the test.db from my directory). I then wanted to run one of the two commands
> to go to version one which is what I was trying to accomplish with what I
> was showing below. Then I wanted check the database using the sqllite
> Manager that I downloaded for Firefox and check that the database had the
> table and the first column. Then finally, run a second command to pick up
> the 002_ file and check the database again to make sure the second column
> got added correctly. How does Sequel know which files in a directory to use.
> In my case I had the two migration files, the data base, and the ruby file
> for migrating all in the same directory. Is that allowed?
>
> Thanks again for the help and I'll see you at the LA Ruby conference,
>
> Scott
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to