blue-shift 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f0cdc1858c2e2f39ce26325ccca7fe95e656038
4
- data.tar.gz: 1c7fe3e6aac9b6e32959e381ae03c06de172c4b4
3
+ metadata.gz: b04345caaca7718409fd226506814a6bc3089706
4
+ data.tar.gz: 37cf7ff3dc26567ca0e6fe42cc82f5686056d7ca
5
5
  SHA512:
6
- metadata.gz: ff1293408c000baa3b5a34f0e717fa6842d614970615e49c15019e89f31387c00884542a7c87dd8e4422b56aea96105e64625970fb2b72c52c19f4dae80919d2
7
- data.tar.gz: 2d4665a820d82718069b3aad88d57fb8db136555663965ba628ebbb16d7a49af33ff9dea86d72cc4fff35e36e70dc8ddee67eaa237f0cc441a93ef992323f9de
6
+ metadata.gz: 94cf1242db8696f8784d093554cd2a61c175550cd78805bec5cd00a21ed6dea20e201b8f7c0400a71a66fb1ee829d69d82001c9821998bb58dcb0bdcf9157470
7
+ data.tar.gz: 2f6fcc11b555832279a55c1a8388310151fc6f0405574fe2217b4e85cd68098b225c78b89e475c23f4f5d0d46a5224a1603562bdaa4367af2390f6a3db142f75
@@ -1,3 +1,3 @@
1
1
  module Blueshift
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -4,7 +4,7 @@ module Sequel
4
4
  module Redshift
5
5
  module SchemaDumper
6
6
  include Sequel::SchemaDumper
7
- DISTSTYLE = { 0 => :even, 1 => :key, 8 => :all }.freeze
7
+ DISTSTYLE = { 1 => :key, 8 => :all }.freeze # 0=>:even, which is the default
8
8
 
9
9
  def dump_table_schema(table, options=OPTS)
10
10
  gen = dump_table_generator(table, options)
@@ -27,7 +27,8 @@ module Sequel
27
27
  private
28
28
 
29
29
  def table_diststyle(table)
30
- self[:pg_class].where(relname: table).map(:reldiststyle).first
30
+ diststyle = DISTSTYLE[ self[:pg_class].where(relname: table.to_s).map(:reldiststyle).first ]
31
+ diststyle unless table_distkey(table)
31
32
  end
32
33
 
33
34
  def table_distkey(table)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue-shift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mansour