Skip to content

Commit

Permalink
Normalize table name in schema dump (PNixx#148)
Browse files Browse the repository at this point in the history
strip the database name from schema dump
  • Loading branch information
danielwestendorf authored Jul 26, 2024
1 parent 9dfcfb8 commit 1582b50
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, ' ')
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 1582b50

Please sign in to comment.