Skip to content

Commit

Permalink
support trilogy adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
mscoutermarsh committed Nov 8, 2023
1 parent 1473224 commit 27222df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/planetscale_rails/tasks/psdb.rake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ namespace :psdb do
password = response["plain_text"]
ENV["PSCALE_PASSWORD_ID"] = response["id"]

"mysql2://#{username}:#{password}@#{host}:3306/#{database}"
adapter = "mysql2"

if defined?(Trilogy)
adapter = "trilogy"
end

"#{adapter}://#{username}:#{password}@#{host}:3306/#{database}?ssl_mode=VERIFY_IDENTITY"
else
puts "Failed to create credentials for PlanetScale #{db_branch_colorized(database, branch)}"
puts "Command: #{command}"
Expand Down

0 comments on commit 27222df

Please sign in to comment.