Skip to content

Commit

Permalink
Use the database defined in the @config
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwestendorf committed Jul 25, 2024
1 parent c267328 commit ddf8f82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def create_schema_dumper(options) # :nodoc:
# @param [String] table
# @return [String]
def show_create_table(table)
do_system_execute("SHOW CREATE TABLE `#{table}`")['data'].try(:first).try(:first).gsub(/[\n\s]+/m, ' ').gsub("#{ActiveRecord::Base.connection_db_config.database}.", "")
do_system_execute("SHOW CREATE TABLE `#{table}`")['data'].try(:first).try(:first).gsub(/[\n\s]+/m, ' ').gsub("#{@config[:database]}.", "")
end

# Create a new ClickHouse database.
Expand Down

0 comments on commit ddf8f82

Please sign in to comment.