blue-shift 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 1eb5441db23e87201fff1ebec710d36adceadd4a
4
- data.tar.gz: 2777f54dd4df8e74371a625036380f6014b789bf
3
+ metadata.gz: 26d2163136534a2d679573b00ef2661909d8c667
4
+ data.tar.gz: 520651258fc18c663fdac086f85d1a9fa83116ad
5
5
  SHA512:
6
- metadata.gz: 579f38c1aea786b425da4998379954f6397c7f4a367e5055d643406f790918373062b91977f8a5f42c70d2bd4cec483ef2b13d995225c74a6276d90c3a9da845
7
- data.tar.gz: 4fca81636872b0706e3d62194bee78246932a2fa59384f1ba933d2968f84baefe6dff1b619e6a86e87861d8718dbf40dd2ff5be8f0bc3e74111ec42e2f715249
6
+ metadata.gz: b238993bdf64330e945de587ff0f70a5d39f6896a93cdf6e7152f06c73c500ed76a930ee4272fdad61eeaff7cce4016687a2f6257216e33bcac9938ac5a36ada
7
+ data.tar.gz: 1e876b52b7b566ae20a329ee7b2ed93571d6e282d034561febb527ba31ab88b7851826eff404bf8609c28a7e227a9ef857a53e3bf5f6a87eb2b5ffb7193958cb
@@ -1,3 +1,3 @@
1
1
  module Blueshift
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -2,9 +2,19 @@ require 'sequel/extensions/schema_dumper'
2
2
  module Sequel
3
3
  module SchemaDumper
4
4
  alias_method :dump_table_schema_without_force, :dump_table_schema
5
+ alias_method :column_schema_to_ruby_type_without_uuid, :column_schema_to_ruby_type
5
6
 
6
7
  def dump_table_schema(table, opts=OPTS)
7
8
  dump_table_schema_without_force(table, opts).gsub('create_table(', 'create_table!(')
8
9
  end
10
+
11
+ def column_schema_to_ruby_type(schema)
12
+ case schema[:db_type].downcase
13
+ when 'uuid'
14
+ {type: :uuid}
15
+ else
16
+ column_schema_to_ruby_type_without_uuid(schema)
17
+ end
18
+ end
9
19
  end
10
20
  end
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.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mansour