I use PostgreSQL in my project and I have triggers and functions defined
as Active Record migrations. In Rails 2.3.10 this works exactly as
expected. However, in Rails 3 it does not. The DBMS service is the same
in both cases so this variation is cause by some implementation change
The difference is that in Rails 2.3 the triggers and functions are
created by db:test:prepare and in Rails 3.0 they are not. In both
Rails-2 and Rails-3 the development and production databases that are
created by db:migrate are identical, complete with the functions and
triggers. However, Rails 3 db:test:prepare does not create the
functions or triggers in the test database at all.
This is a fairly significant failing and if it is a bug then I am very
surprised to discover it. If I am doing something wrong then I would
like to know what it is.