Skip to content

Commit

Permalink
published 0.5.3 - fix replica cluster for a new syntax MergeTree
Browse files Browse the repository at this point in the history
  • Loading branch information
PNixx committed Sep 22, 2021
1 parent 01ef156 commit 3aab77b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Version 0.5.3 (Sep 22, 2021)

* Fix replica cluster for a new syntax MergeTree
* Fix support rails 5.2 on alter table
* Support array type of column
* Support Rails 6.1.0 [@bdevel](https://github.com/bdevel)

### Version 0.4.10 (Mar 10, 2021)

* Support ClickHouse 20.9+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def connect

def apply_replica(table, options)
if replica && cluster && options[:options]
match = options[:options].match(/^(.*?MergeTree)\(([^\)]*)\)(.*?)$/)
match = options[:options].match(/^(.*?MergeTree)(?:\(([^\)]*)\))?(.*?)$/)
if match
options[:options] = "Replicated#{match[1]}(#{([replica_path(table), replica].map{|v| "'#{v}'"} + [match[2].presence]).compact.join(', ')})#{match[3]}"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/clickhouse-activerecord/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ClickhouseActiverecord
VERSION = '0.5.2'
VERSION = '0.5.3'
end

0 comments on commit 3aab77b

Please sign in to comment.