Can Rails app and rake db:migrate use different database credentials?

Viewed 1429

Does anyone know if Rails can be configured so that rake (e.g. db:migrate) uses a different database user to the app itself?

It seems to me that the database user for the app does not need permissions to drop tables and columns, where as db:migrate does, so separate should make for a more secure app...?

But I assume by default both would use credentials in database.yml

I'm using 2.3.8 with MySQL.

Thanks!

Glen.

1 Answers
Related