I use Oracle and i really want to use migrations, but there seems to be
no way to setup foreign key constraints. Is this true? If it is then
doesn’t that make migrations useles with Oracle?
Thanks
Chris
I use Oracle and i really want to use migrations, but there seems to be
no way to setup foreign key constraints. Is this true? If it is then
doesn’t that make migrations useles with Oracle?
Thanks
Chris
Chris wrote:
I use Oracle and i really want to use migrations, but there seems to be
no way to setup foreign key constraints.
Is this true?
Yes.
If it is then
doesn’t that make migrations useles with Oracle?
No. It makes migrations useless with any db here you want to use
constraints. You can easily get by without them, and migrations
benefits are worth it.
However, I made a little simple plugin which now supports MySQL and
PostGres.
http://blog.alancfrancis.com/2006/07/add_foreign_key.html
If you were to send me ( gmail: alancfrancis) the syntax for adding and
removing a foreign key to an Oracle DB, I’ll update the plugin over the
next day or so.
A.
No. It makes migrations useless with any db here you want to use
constraints. You can easily get by without them, and migrations
benefits are worth it.
Doesn’t Oracle use foreign keys to somehow speed up queries? …i think
it might.
Alan F. said something:
However, I made a little simple plugin which now supports MySQL and
PostGres.
There is also the Foreign Key Migrations plugin:
http://www.redhillconsulting.com.au/rails_plugins.html
which sets up constraints automatically, so a column customer_id will
set up an fk constraint on customers(id).
This feels very railsy, as no extra config is needed.
iain
–
“If sharing a thing in no way diminishes it, it is not
rightly owned if it is not shared.” – St. Augustine
#rm -rf /
http://www.geeksoc.org/
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs