We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce57892 commit 8e4ea2cCopy full SHA for 8e4ea2c
lib/active_record/connection_adapters/clickhouse_adapter.rb
@@ -264,7 +264,7 @@ def show_create_table(table)
264
265
# Create a new ClickHouse database.
266
def create_database(name)
267
- sql = apply_cluster "CREATE DATABASE #{quote_table_name(name)}"
+ sql = apply_cluster "CREATE DATABASE IF NOT EXISTS #{quote_table_name(name)}"
268
log_with_debug(sql, adapter_name) do
269
res = @connection.post("/?#{@connection_config.except(:database).to_param}", sql)
270
process_response(res)
0 commit comments