search for: remove_foreign_key_constraint

Displaying 3 results from an estimated 3 matches for "remove_foreign_key_constraint".

2005 Dec 05
0
bug in bubbleshare's Active Record extensions?
I''m using add_foreign_key_constraint and remove_foreign_key_constraint from Bubbleshare''s Active Records Extension plugin now to manage the foreign key relationships I describe in my other recent posting. The constraints get added within migrations, but I''m running into two problems (Rails 0.14.3, PostgreSQL db): 1. Dumping the schema doesn'...
2006 Jun 21
1
Migration with foreign key won''t work
..._foreign_key_constraint :artists, :artist_type_id, :artist_types, :artist_type, :on_update => :cascade, :on_delete => :restrict # artists(artist_type_id) references artist_types(artist_type) end def self.down drop_table :artists drop_table :artist_types # Foreign Keys remove_foreign_key_constraint :artists, :foreign_key => :artist_type_id end end When running it, everything goes well up to the foreign keys. I get the following error: -- add_foreign_key_constraint(:artists, :artist_type_id, :artist_types, :artist_type, {:on_delete=>:restrict, :on_update=>:cascade}) rake aborte...
2006 Jul 13
6
Migrations + foreign keys
Hi all, In the AWDR author use the execute method to declare foreign keys: execute "alter table.... add constraint.... foreign key...." Is there a ruby sintax to declare a foreign key in a migration class? -- Posted via http://www.ruby-forum.com/.