On Jul 2, 6:43 am, Scott LaBounty <[email protected]> wrote:
> I just put up a blog post 
> (http://steamcode.blogspot.com/2010/07/sequel-trees.html) on using the new
> Tree plugin for Sequel. Comments would be appreciated (especially
> corrections).

It looks good.  I would recommend the following changes:

# Use real foreign keys, and a portable text column
DB.create_table :employees do
  primary_key :id
  foreign_key :parent_id, :employees
  String :name, :text=>true, :unique=>true
end

# Don't provide a parent_id for the root of the tree.
alice = Employee.create(:name => "Alice")

Jeremy

-- 
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