pg_spec_helper 1.9.10 → 1.9.11

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: 18c3f281f5220ac541ecdff460921d5256d698cde0dfabb9a5522802b9c99cb3
4
- data.tar.gz: 45a6ad92ec2637d058ae2978572464e25b3f9153ef543671f49b532a11fc1b3d
3
+ metadata.gz: 72b2fec5101ae1255ade32d6f1c255d312571bf737b3c4380d868a66287fb1e7
4
+ data.tar.gz: 40373357e82222f4b8a69d553db832683a6cf66fed626938032be2cbe2dd9aa2
5
5
  SHA512:
6
- metadata.gz: f071cc5f3bda777b7673346cb916230a65375ccb29d1496a106cc2b37d1c18de2be388c59991e144891c67d09156e19c9c64cc90e5e1150ec8fbe019f545a1ca
7
- data.tar.gz: b12991673a455dc4bbded79ffe4e222b8322295aa57468d68634ceaf7d4db746a90fd588a31e5966276889835ad2c2bd88ef95e0887dc15db11c76783889aa63
6
+ metadata.gz: f5822433af51aa0b2d3b22e746b238a4c39cc998729c11a76e889cc5746363998b6462d33eeb3d65392869d96f4c3282053a71e813b3e8c0b669335ddd23ed70
7
+ data.tar.gz: 9f0b3d6ebbbbea4e26d1a6727b4243b7f45d5501afd44091599560541e6fe9ab86fcf94b18ec550361190d74ee5929f95d9cbc99ddee4c57a105d476527faf61
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.9.11](https://github.com/craigulliott/pg_spec_helper/compare/v1.9.10...v1.9.11) (2023-09-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * automatically add the citext extension if a column requires it ([0282269](https://github.com/craigulliott/pg_spec_helper/commit/028226916532ec135c47fe59540f556203d9964f))
9
+
3
10
  ## [1.9.10](https://github.com/craigulliott/pg_spec_helper/compare/v1.9.9...v1.9.10) (2023-08-25)
4
11
 
5
12
 
@@ -7,6 +7,17 @@ class PGSpecHelper
7
7
 
8
8
  # create a column for the provided table
9
9
  def create_column schema_name, table_name, column_name, type, null = true, default = nil
10
+ # required extension for citext
11
+ if type.to_sym == :citext
12
+ connection.exec(<<~SQL)
13
+ -- temporarily set the client_min_messages to WARNING to
14
+ -- suppress the NOTICE messages about extension already existing
15
+ SET client_min_messages TO WARNING;
16
+ CREATE EXTENSION IF NOT EXISTS "citext";
17
+ SET client_min_messages TO NOTICE;
18
+ SQL
19
+ end
20
+
10
21
  # note the `type` is safe from sql_injection due to the validation above
11
22
  connection.exec(<<~SQL)
12
23
  ALTER TABLE #{connection.quote_ident schema_name.to_s}.#{connection.quote_ident table_name.to_s}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class PGSpecHelper
4
- VERSION = "1.9.10"
4
+ VERSION = "1.9.11"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_spec_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.10
4
+ version: 1.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig Ulliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-25 00:00:00.000000000 Z
11
+ date: 2023-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg