Forum: Ruby on Rails Postgres, testing and maybe spurious database DROPpings?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fcf1b568beaa858c0c459d44fb126315?d=identicon&s=25 Daniel C. (djcp)
on 2007-02-06 16:38
Folks,

I don't like that I have to grant CREATEDB rights to the test user to
get testing working smoothly with Postgres.

What is the philosophical reason that Rails wants to drop and recreate
databases during the testing? It would seem to me that "pg_dump -c" (the
"clean" dump option, similar to mysqldump's --add-drop-tables ) would
suffice when you're using SQL format schema dumps.

Another problem with dropping databases is that procedural languages are
lost unless they are loaded into template1.

The workaround is to just install procedural languages into template1
and grant CREATEDB rights to the test user, but it would feel cleaner to
leave database creation up to the postgres admin user to me. "Principle
of least privilege" and all that.

Thoughts?

-DJCP
Software Engineer
EndPoint.com
42b45901e93741499115af6842e4365f?d=identicon&s=25 Alex S. (asoto)
on 2007-02-07 18:54
(Received via mailing list)
I just don't think in practice people really care about the test users
privileges since it doesn't run against critical databases (like
production).

On Feb 6, 7:38 am, Daniel Collis-puro <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.