Skip to content

Commit 9e89ced

Browse files
author
rob
committed
Removes username and password for dev db
This is a bit chaotic of a change, but I think it's worth it. On a mac when you install postgres (`brew install postgres`) it creates a user login for the current user and a database for that user. It configures the system to trust the current user to login to postgres without a password _because the user has already logged into the system_. On linux this configuration is almost exactly the same. The database will already trust pg users logging in with system users which name matches, but by default there is no user created. (At least this is true for the debian/ubuntu postgres install.) This is easily remidied by running: `createuser --createdb $(whoami)`. Before this change, the configuration requires that everyone create a login to their local postgres with a password that matches this project password. After this change, anyone with a properly set up local database can connect without any manual setup. After this is merged, local development servers will need to be rebooted and `bin/rails db:reset` will need to be run again.
1 parent b9eb75b commit 9e89ced

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

config/database.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
default: &default
1616
adapter: postgresql
1717
encoding: unicode
18-
user: postgres
1918
host: localhost
20-
password: mysecretpassword
2119
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
2220

2321
development:

0 commit comments

Comments
 (0)