search for: add_foreign_key

Displaying 7 results from an estimated 7 matches for "add_foreign_key".

2009 Sep 28
5
Multi-databases support
...s in order to find a good answer for the "foreign key problem" which forces OVirt to stay on pg. I have found a plugin on this particular problem, named foreigner : http://github.com/matthuhiggins/foreigner It provides a rails' syntax to common operation on them. For instance : add_foreign_key(from_table, to_table, options) remove_foreign_key(from_table, options) foreign_keys(table_name) I really like to keep my development computer to run as fast as possible (ie without a database service), so I have even tried to integrate this plugin into OVirt, in a transparent way for exist...
2011 Jun 11
1
Having a problem adding a foreign key
...QLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book migration and i ran "rake db:migrate" but still it is giving me the same exception.I am using Rails 3 in windows and devise to authenticate user. HOME VIEW <p><%= link_to "Add new Book",:controller =>"book", :action =&gt...
2006 Feb 17
1
foreign key support in mysql adapter
Hi! I''m using Migration to define my database schema and these "ALTER TABLE t ADD FOREIGN KEY..." look really ugly - that''s why I wanted to ask it would be possible to simply add add_foreign_key method to ActiveRecord? Are there any reasons this isn''t yet implemented? Greetings, Esad -- Posted via http://www.ruby-forum.com/.
2006 Jul 10
3
Can migrations set up foreign key references?
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 -- Posted via http://www.ruby-forum.com/.
2006 Jan 18
3
Support for foreign keys in Migrations
Is there any work being done to add support for defining foreign keys in ActiveRecord Migrations? If not is it something that people would find useful or do most people here believe in the "Application Database" style over the "Integration Database" style [1] as defined by Fowler? I''d love to see support for foreign keys in Migrations. For selfish reasons
2013 Mar 11
0
Any interest in various features from "schema_plus" gem?
...s: t.integer :post_id, foreign_key: true # creates a foreign key constraint to table posts t.belongs_to :post, foreign_key: { on_delete: :cascade } # has various options connection.foreign_keys(table) #=> array of ForeignKeyDefinition objects # and add_foreign_key, remove_foreign_key, connection.reverse_foreign_keys # schema_plus actually has ''foreign_key: true'' as the default behavior, for rails i''d probably make the default be false (configurable) Views: create_view :posts_commented_by_staff, Post.joins(comment: use...
2011 Nov 28
29
Lack of foreign-key constraints support in ActiveRecord
Is there any reason why AR has never supported foreign-key constraints? I can understand the lack of support for triggers and stored procedures since they are highly dependent on the database to create a wrap API around them. But this is not the case for foreign keys. This is specially important for open-source projects like Redmine/Chiliproject and Gitorious where you shouldn''t be