pg_spec_helper 1.9.10 → 1.9.11
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/pg_spec_helper/columns.rb +11 -0
- data/lib/pg_spec_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72b2fec5101ae1255ade32d6f1c255d312571bf737b3c4380d868a66287fb1e7
|
|
4
|
+
data.tar.gz: 40373357e82222f4b8a69d553db832683a6cf66fed626938032be2cbe2dd9aa2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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}
|
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.
|
|
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-
|
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pg
|