Displaying 3 results from an estimated 3 matches for "remove_foreign_key".
2009 Sep 28
5
Multi-databases support
...eign
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 existing db.
After a couple of patch on the plugin itself...
2013 Mar 11
0
Any interest in various features from "schema_plus" gem?
...eger :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:
user).where(users: {rol...
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