On Thu, Jul 11, 2013 at 09:47:33AM -0700, [email protected] wrote:
>
> We are in the process of implementing ruote within our app, and I just
> switched our app from using Ruote::FsStorage to using
> Ruote::Sequel::Storage.  I was a bit surprised that I had to manually
> create the table that ruote uses to persist its state.  I was expecting
> Ruote::Sequel::Storage to automatically create whatever database tables it
> needed on-the-fly (much like how Ruote::FsStorage automatically creates
> whatever internal structure it needs on disk to store the ruote documents
> on-the-fly).  Just curious if there is a reason why Ruote::Sequel::Storage
> works this way?
>
> This is how I am initializing Ruote::Sequel::Storage in our app:
>
> sequel = Sequel.connect(db)
> Ruote::Sequel.create_table(sequel, false, 'ruote')
> storage = Ruote::Sequel::Storage.new(sequel, 'sequel_table_name' => 'ruote')
>
> It would be nice if I just needed to do this:
>
> sequel = Sequel.connect(db)
> storage = Ruote::Sequel::Storage.new(sequel, 'sequel_table_name' =>
> 'ruote', 're_create' => false)
>
> If this sounds like a good idea, I can certainly fork ruote-sequel on
> github, figure out how to make this change, and then issue a pull request.
> Just let me know.

Hello Denis,

I tend to create the table via a rake task in the preparation phase.

I think your pull request idea is good, please proceed with it. The important
thing is to prevent integrators from nuking the table when initializing a
sequel storage, maybe "create_if_missing" => true is better than "re_create"
=> false, the default would be "create_if_missing" => false.


Looking forward to your pull request, thanks,

--
John Mettraux   -   http://lambda.io/jmettraux

-- 
-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to