Skip to content

Commit

Permalink
get MySQL config from ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
subelsky committed Oct 16, 2017
1 parent 6c785d0 commit 5da8237
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/mysql_migrator
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class User
end
end

client = Mysql2::Client.new(:host => "localhost", :username => "root",database: 'coyote')
uri = URI.parse(ENV.fetch('JAWSDB_URL'))
db = uri.path[1..-1]
client = Mysql2::Client.new(host: uri.host,username: uri.user,database: db,password: uri.password)

org = Organization.find(2)

Expand Down

0 comments on commit 5da8237

Please sign in to comment.