Skip to content

Commit

Permalink
Load environment variables before executing createdb command. Removed…
Browse files Browse the repository at this point in the history
… unneeded create options
  • Loading branch information
ziggurat committed Jul 14, 2015
1 parent 18806bc commit 5086e25
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/lotus/model/migrator/postgres_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class PostgresAdapter < Adapter
# @since 0.4.0
# @api private
def create
`createdb #{ database } #{ create_options }`
set_environment_variables
`createdb #{ database }`
end

# @since 0.4.0
Expand Down Expand Up @@ -59,14 +60,6 @@ def load

private

# @since 0.4.0
# @api private
def create_options
result = ""
result += %( --owner=#{ username }) unless username.nil?
result
end

# @since 0.4.0
# @api private
def set_environment_variables
Expand Down

0 comments on commit 5086e25

Please sign in to comment.