diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-27 20:50:39 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-27 20:50:39 -0700 |
| commit | 152fcca9fce823fd38fff36b392da85f0be93404 (patch) | |
| tree | 5a42cf51ee316dc767cb6123613be5456b749d6f | |
| parent | 1811d2462769f3e3d7a5b6009ec7bc4b2281fee4 (diff) | |
specify host when creating a database.
| -rw-r--r-- | build/scripts/db.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/scripts/db.rake b/build/scripts/db.rake index ff2b089..4237156 100644 --- a/build/scripts/db.rake +++ b/build/scripts/db.rake @@ -24,11 +24,12 @@ class Database configuration = load_configuration_for(environment) database = configuration['database'] username = configuration['username'] + host = configuration['host'] #password = configuration['password'] #command = "CREATE USER #{username} WITH password '#{password}'" #sh "psql -c '#{command}'" - sh "psql -c 'CREATE DATABASE #{database} WITH OWNER #{username}'" - sh "psql -c 'GRANT ALL PRIVILEGES ON DATABASE #{database} TO #{username}'" + sh "psql -h #{host} -c 'CREATE DATABASE #{database} WITH OWNER #{username}'" + sh "psql -h #{host} -c 'GRANT ALL PRIVILEGES ON DATABASE #{database} TO #{username}'" end def migrate(environment) |
