Skip to content

Commit

Permalink
Don't throw exception when creating database
Browse files Browse the repository at this point in the history
  • Loading branch information
PoroshkinaVV committed Feb 29, 2024
1 parent ce57892 commit 8e4ea2c
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 show_create_table(table)

# Create a new ClickHouse database.
def create_database(name)
sql = apply_cluster "CREATE DATABASE #{quote_table_name(name)}"
sql = apply_cluster "CREATE DATABASE IF NOT EXISTS #{quote_table_name(name)}"
log_with_debug(sql, adapter_name) do
res = @connection.post("/?#{@connection_config.except(:database).to_param}", sql)
process_response(res)
Expand Down

0 comments on commit 8e4ea2c

Please sign in to comment.