blue-shift 0.0.3 → 0.0.5

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: fbdb82fbebfd1c8a3535c8b23e454236334fc174
4
- data.tar.gz: d7f4925e8a96b773d4cf47a6adedd452d86fddf8
3
+ metadata.gz: d452ee90d0421cc0b881ae27feb0977f41f5d6a0
4
+ data.tar.gz: 89540a62ff3516e4e5b2e7bd6394a864787b4d20
5
5
  SHA512:
6
- metadata.gz: 7ff31243b99c2af428ce80d54a6e5dfdcc9528b68b1b22ebad70f5f6b24a1605ffed4342041ddbf1717c71d0d6834cfde7559d03272e381ba1bd9486594d7200
7
- data.tar.gz: 7d476d66ab8af83aa0e5961d17c2a5e6fb525d5a38bec5ff4760aee41dcc996b5b354914ce6b608781ca4e0a24d9e3f5c71a1087c9a95cd34e8d195642e5433c
6
+ metadata.gz: a472c137b4bd7f644516b8f262a54c052b4867fb2cdc9aa02de9f137e8c57dc92897d1756c88363febdedc1d5ee4396081d131b476834dabdb74b79ad0b18396
7
+ data.tar.gz: d7091e6553a4d9097e6751f2fb48c95aa395c3e7272962868239d65f1907e3469f4395166e080478d26f29615a7e1b507f73fb87af6e4185857f7768c65d0a88
@@ -0,0 +1,2 @@
1
+ Suuid = Class.new
2
+ Sequel::Schema::CreateTableGenerator.add_type_method Suuid
@@ -1,3 +1,3 @@
1
1
  module Blueshift
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -0,0 +1,16 @@
1
+ require 'sequel/adapters/postgres'
2
+ require 'blueshift/uuid'
3
+
4
+ module Sequel
5
+ module Postgres
6
+ class Database
7
+ def type_literal_generic_suuid(column)
8
+ column[:fixed] = true
9
+ column[:size] = 36
10
+ column[:primary_key] = true
11
+ column[:null] = false
12
+ type_literal_generic_string(column)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,4 +1,4 @@
1
- require 'sequel/adapters/postgres'
1
+ require 'sequel/adapters/postgres_ext'
2
2
 
3
3
  module Sequel
4
4
  module Redshift
@@ -24,6 +24,10 @@ module Sequel
24
24
 
25
25
  private
26
26
 
27
+ def type_literal_generic_string(column)
28
+ super(column.merge(text: false))
29
+ end
30
+
27
31
  def create_table_sql(name, generator, options)
28
32
  validate_options!(options)
29
33
  super.tap do |sql|
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.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mansour
@@ -116,7 +116,9 @@ files:
116
116
  - blueshift.gemspec
117
117
  - lib/blueshift.rb
118
118
  - lib/blueshift/migration.rb
119
+ - lib/blueshift/uuid.rb
119
120
  - lib/blueshift/version.rb
121
+ - lib/sequel/adapters/postgres_ext.rb
120
122
  - lib/sequel/adapters/redshift.rb
121
123
  - lib/sequel/extensions/redshift_schema_dumper.rb
122
124
  - lib/tasks/generate_migration.rake