On 2 Apr 2009, at 16:04, James Byrne wrote:

>
> Rails 2.3
>
> How does one identify the adapter that a migration is using?  I have
> some SQL code that only applies if the postgresql adapter is involved
> and I wish to put my execute method inside a suitable conditional.
> However, I cannot see a way to get this information from an instance  
> of
> ActiveRecord::Migration.  Nonetheless, some means must exist for
> migrations to work.
>
> How do I ID the DBMS adapter that the migration is using?

You could check the class of  ActiveRecord::Base.connection

Fred
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to