activerecord-pg-format-db-structure 0.3.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: a18ecc82be3d91f7163c58a3e585c2fa4792767cf07467d3bee7e741fac2281b
4
- data.tar.gz: 33def417b36f7f11eba8fce6d57f270aaf29b1320e6cf75b3a183719493bb2b5
3
+ metadata.gz: 951bd79c320d7f072e3127b173f0f10a62e3790ec723898560b96c20be48687a
4
+ data.tar.gz: 3dfe0017a38748c7514db4354f39d4c12e6c3ae19a2828414798f6ec24dd7e32
5
5
  SHA512:
6
- metadata.gz: a9a16f498480f55da503970918cf3a6df4e1899dd0c9331faa684b12ddbb32f1bde3935d7becae37f3e7f9e15190e0939f9587348c5786031c1c1edbf7cd7cfb
7
- data.tar.gz: a1cead05ba2829d0fee3364e097495f7c100cc84cee09bfe2ae08e8b8a23d99ec5a16500af9d0611f5bf4f9db2b3fcc70ed492e1acc508aa2aa038e5db55de8e
6
+ metadata.gz: 17a295ed4ffc4052905dc7ef1b40ee85038598b6114ea5c3eef766fe77580ca52f06cf956652abbddd285823e9c2706eee90891890f1b0ce3a1bb5c747a922c8
7
+ data.tar.gz: e04dc537cd946efe5dc0064e19f933ffa9fb6315bd5f10a2102318d4149f35479cf31ef06d2c6a2abeeae623f30dbaa07edd5fe7e01f3c8b6a723c2180994093
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
@@ -119,6 +119,8 @@ Lint/UnexpectedBlockArity: # new in 1.5
119
119
  Enabled: true
120
120
  Lint/UnmodifiedReduceAccumulator: # new in 1.1
121
121
  Enabled: true
122
+ Lint/UselessConstantScoping:
123
+ Enabled: false
122
124
  Lint/UselessDefined: # new in 1.69
123
125
  Enabled: true
124
126
  Lint/UselessNumericOperation: # new in 1.66
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.0] - 2025-08-04
4
+
5
+ - Upgrade pg_query to 6.1 to add support for latest mac OS version
6
+
7
+ ## [0.4.0] - 2025-03-21
8
+
9
+ - Remove no-op `NOT VALID` setting when inlining constraints
10
+
3
11
  ## [0.3.0] - 2025-03-15
4
12
 
5
13
  - Introduce StatementAppender for better spacing between statements
data/README.md CHANGED
@@ -347,7 +347,9 @@ sequence indeed has default settings.
347
347
 
348
348
  ### InlineConstraints
349
349
 
350
- Inline non-foreign key constraints into table declaration
350
+ Inline non-foreign key constraints into table declaration.
351
+
352
+ Note that this also remove the `NOT VALID` setting if present, since that's a no-op when the constraint is created at the same time as the table.
351
353
 
352
354
  ### MoveIndicesAfterCreateTable
353
355
 
@@ -64,7 +64,7 @@ module ActiveRecordPgFormatDbStructure
64
64
 
65
65
  def add_constraint!(raw_statement, constraint)
66
66
  raw_statement.stmt.create_stmt.table_elts << PgQuery::Node.from(
67
- PgQuery::Constraint.new(constraint)
67
+ PgQuery::Constraint.new(constraint.merge(skip_validation: nil))
68
68
  )
69
69
  end
70
70
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordPgFormatDbStructure
4
- VERSION = "0.3.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-pg-format-db-structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jell
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-15 00:00:00.000000000 Z
10
+ date: 2025-08-04 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: pg_query
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '6.0'
18
+ version: '6.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '6.0'
25
+ version: '6.1'
26
26
  description: automatically runs after each db:schema:dump and formats the output
27
27
  email:
28
28
  - rubygems@reify.se