On Thu, 5 Jul 2007, Ron wrote:
>
> Is there a way to create the db schema completely through the ruby
> syntax in a migration?
> If i want a relation between table there doesnt seem a way to create
> it when having the environment table set to :ruby instead of :sql and
> using migrations.
I asked this one recently, so I can answer this:
You need the plugin called fixture_references. There''s not a whole lot
of documentation for it yet, so I quote the patch I sent them for an
INSTALL file:
Index: INSTALL
==================================================================--- INSTALL
(revision 0)
+++ INSTALL (revision 0)
@@ -0,0 +1,5 @@
+# Change directory to the RAILS_ROOT for your project.
+# Then do:
+./script/plugin install http://svn.pluginaweek.org/trunk/plug
ins/active_record/migrations/fixture_references
+
+
More docs, well, discussion about how to use it at:
http://www.pluginaweek.org/2007/04/07/14-fix-your-fixtures-with-fewer-foreign-key-ids/
HTH
Hugh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---