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 +4 -4
- data/lib/blueshift/version.rb +1 -1
- data/lib/sequel/extensions/redshift_schema_dumper.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04345caaca7718409fd226506814a6bc3089706
|
4
|
+
data.tar.gz: 37cf7ff3dc26567ca0e6fe42cc82f5686056d7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94cf1242db8696f8784d093554cd2a61c175550cd78805bec5cd00a21ed6dea20e201b8f7c0400a71a66fb1ee829d69d82001c9821998bb58dcb0bdcf9157470
|
7
|
+
data.tar.gz: 2f6fcc11b555832279a55c1a8388310151fc6f0405574fe2217b4e85cd68098b225c78b89e475c23f4f5d0d46a5224a1603562bdaa4367af2390f6a3db142f75
|
data/lib/blueshift/version.rb
CHANGED
@@ -4,7 +4,7 @@ module Sequel
|
|
4
4
|
module Redshift
|
5
5
|
module SchemaDumper
|
6
6
|
include Sequel::SchemaDumper
|
7
|
-
DISTSTYLE = {
|
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)
|