From 6d05c793cafe79860bcbb469d6c46c83c531ab34 Mon Sep 17 00:00:00 2001 From: Rodrigo Rosenfeld Rosas Date: Mon, 28 Nov 2011 13:15:07 -0200 Subject: Update information about foreign key plugins support in the guides There is not "a number" of up-to-date maintained plugins for dealing with foreign keys. The foreign_key_migrations does not have any update since 2009 and is also about to be removed: Extracted from http://www.harukizaemon.com/2009/09/plugins-grab-em-while-theyre-stale.html, referenced in the plugin reference of the old guide version: "And so it is that I will very shortly (within the next month) delete most of the plugins from my GitHub account (harukizaemon)" --- railties/guides/source/migrations.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source') diff --git a/railties/guides/source/migrations.textile b/railties/guides/source/migrations.textile index 5b52a93853..c63f2aa119 100644 --- a/railties/guides/source/migrations.textile +++ b/railties/guides/source/migrations.textile @@ -670,4 +670,4 @@ The Active Record way claims that intelligence belongs in your models, not in th Validations such as +validates :foreign_key, :uniqueness => true+ are one way in which models can enforce data integrity. The +:dependent+ option on associations allows models to automatically destroy child objects when the parent is destroyed. Like anything which operates at the application level, these cannot guarantee referential integrity and so some people augment them with foreign key constraints. -Although Active Record does not provide any tools for working directly with such features, the +execute+ method can be used to execute arbitrary SQL. There are also a number of plugins such as "foreign_key_migrations":https://github.com/harukizaemon/redhillonrails/tree/master/foreign_key_migrations/ which add foreign key support to Active Record (including support for dumping foreign keys in +db/schema.rb+). +Although Active Record does not provide any tools for working directly with such features, the +execute+ method can be used to execute arbitrary SQL. You could also use some plugin like "foreigner":https://github.com/matthuhiggins/foreigner which add foreign key support to Active Record (including support for dumping foreign keys in +db/schema.rb+). -- cgit v1.2.3