pg_saurus 4.0.1 → 4.0.2

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
  SHA256:
3
- metadata.gz: d4621e5c56482cf923810bd206b2449469102f56a92a55acf002d004c5664675
4
- data.tar.gz: 8c5b2e568586c128e7d0a248ef6cdd2b8c1f67e8e02e888fa4f2eee5bcd8adde
3
+ metadata.gz: 20e72495c2fa2ffdc422bfeefac5c196c888685cf98ed513dc94da2608476572
4
+ data.tar.gz: '0366790a931f6ebb4283f80d1112588de221d3844968eaedeeb059c4443124ec'
5
5
  SHA512:
6
- metadata.gz: f9d730184e0b65c57e7a894abf10d26e2553e5b627d92ed211a9b93a7e3e1e163eb95ef3429ea837509e0d1caa5607efc29655446411b51111f90dddd7d7be59
7
- data.tar.gz: 5256f3a310c2a8d5586477ee0a0f45c208a02b60ab0720632f26bcaf9b0fa428b546fa6b9ff825b2b8fc2d1e872e5939eefbda75036d93f3486b4485d3dbcbc7
6
+ metadata.gz: 149f1cd2738b90d36cc52900af989fed800064b28242e0de3aadb50eff7c3316c240d2696f01de3c6b14d395e2202a68427bb8ff6ab76b673f29f15c8f1cd78a
7
+ data.tar.gz: 489cda1e93255d713f7fa6c479b738c436ec74fb7591358d7a02c6e3acd0693adcf0e6d63630000299a46ae375f65fd48c2e841cff757eed29cc74e03a664202
@@ -19,8 +19,10 @@ module PgSaurus
19
19
  #
20
20
  # @return [void]
21
21
  def create_schema_if_not_exists(schema_name)
22
- sql = %{CREATE SCHEMA IF NOT EXISTS "#{schema_name}"}
23
- connection.execute sql
22
+ unless schemas.include?(schema_name.to_s)
23
+ sql = %{CREATE SCHEMA "#{schema_name}"}
24
+ connection.execute sql
25
+ end
24
26
  end
25
27
 
26
28
  # Ensure schema does not exists.
@@ -1,4 +1,4 @@
1
1
  module PgSaurus
2
2
  # Version of pg_saurus gem.
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_saurus
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Potapov Sergey
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-10-26 00:00:00.000000000 Z
16
+ date: 2019-11-16 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: pg