clickhouse-activerecord 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c1652d6cf040ebaf43559441ccfa2496f4c408b232ca6d3d1c71da9bbc20209
4
- data.tar.gz: 900d15344b100536b6f1e0ac1dd3e1df03b890fe5c1b6f7b6f9218283156c17f
3
+ metadata.gz: 419c50a4b99b183f729939034e8f6b671bf899fb0ef93fc97f105798fa437aa1
4
+ data.tar.gz: 7508a2ed443d64565ca6b1f5af48bf076cf40d2eae91fd3c3187cae05371a864
5
5
  SHA512:
6
- metadata.gz: d9a74ee0ca1e865f821d5c8a1f8612e30dcd790cd79725344ab568b246d30d895711a69f5f05542ff1989f194605a70d7906ec432c90bf2c0688f5a5b120b3ab
7
- data.tar.gz: ddb82724f85c5a2cfb6da4db250d20f9fc6eb7cddf91a8bada889f07eb717f8657ad011d71e2ab19cb625b83b74dad91a8adeb1bcf94886f33fbd2cd999cc833
6
+ metadata.gz: 8e8607fa219f6e17e22a3029ba564e6d3d6d2bd39cf86f639d277a6e83fe2ffb1a47e93fceb8d20c4de6a7e9679f8a15b40ee744bfa445be14e6e0693dde4a0e
7
+ data.tar.gz: 5e58b79aab91a64387dc74821a75710c70738791227084a3a6ce29e72827a40e0458d48643a99c14b6d2dc6c94bbed8672d31051d7501084aa3a7e0bc27ef6a1
@@ -54,16 +54,11 @@ module ClickhouseActiverecord
54
54
  tbl.print ', materialized: true' if match && match[1].presence
55
55
  end
56
56
 
57
- case pk
58
- when String
59
- tbl.print ", primary_key: #{pk.inspect}" unless pk == "id"
60
- pkcol = columns.detect { |c| c.name == pk }
61
- pkcolspec = column_spec_for_primary_key(pkcol)
62
- if pkcolspec.present?
63
- tbl.print ", #{format_colspec(pkcolspec)}"
57
+ if (id = columns.detect { |c| c.name == 'id' })
58
+ spec = column_spec_for_primary_key(id)
59
+ if spec.present?
60
+ tbl.print ", #{format_colspec(spec)}"
64
61
  end
65
- when Array
66
- tbl.print ", primary_key: #{pk.inspect}"
67
62
  else
68
63
  tbl.print ", id: false"
69
64
  end
@@ -1,3 +1,3 @@
1
1
  module ClickhouseActiverecord
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clickhouse-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Odintsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-27 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler