ridgepole 3.2.3 → 3.2.4

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: 1a307f88c8f4187e3ec20de74f563caa0041e66749b0c2bf0345724a2a15103b
4
- data.tar.gz: b74fc6cae628ac13466fd7dde31679d518f3bcc963bb7dd5877c193720bebf25
3
+ metadata.gz: 30883571738ca7fb36863b862ea2c3c447dd2b557065c60c1c1a21a66beddb42
4
+ data.tar.gz: 425b7bc6cc0f9efffa9ea3b02fe681db1a242d1d2b41fcceee2d463082a7c866
5
5
  SHA512:
6
- metadata.gz: 9b6d880d3b5f91ab5947dd416180c097df2ea99c566df051195357898ee457dbcc35a724467e43b23620d8fc62b1dba7a44460d71535ad7977f1f851a616f08b
7
- data.tar.gz: 37b2b51fbbf5aadb34fd85d1526b30ddc550bbd85467e3183148f8f8376caf78c0b25f62ed7a32585c6f03caddae73a6e8b8dcbeb762058b609fc382b971bec9
6
+ metadata.gz: 6e716a0ade803f5ae29aec8f861f06009aaec35274fcc4fbb28984525d956ca7c2a4681700938ce04906f1e192e6acf4838cbf37c50739b15d75c88743d7b4ba
7
+ data.tar.gz: 1a208c2dadeda2e1ccc0c250223f51351688b35b8046c5819998fe4249fb507e973b30310648fc12f3b7b84a4fb584771622fa91f2828eff57919b2a79f5ab70
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## 3.2
4
4
 
5
+ ### 3.2.4 (2026/08/08)
6
+
7
+ - Fix inverted "No change" log in `--diff --with-apply`. [pull#730](https://github.com/ridgepole/ridgepole/pull/730)
8
+
5
9
  ### 3.2.3 (2026/08/01)
6
10
 
7
11
  - Emit `validate_constraint` when DB is NOT VALID and DSL implies validated. [pull#718](https://github.com/ridgepole/ridgepole/pull/718)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ridgepole
1
+ ![](https://github.com/user-attachments/assets/e446e211-054a-43d8-978b-c52ae6f1ea93)
2
2
 
3
3
  Ridgepole is a tool to manage DB schema.
4
4
 
@@ -10,17 +10,18 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
10
10
  [![codecov](https://codecov.io/gh/ridgepole/ridgepole/graph/badge.svg)](https://codecov.io/gh/ridgepole/ridgepole)
11
11
 
12
12
  > [!TIP]
13
- > Also developing similar declarative schema tools — single Go binary, plain SQL as the schema definition:
13
+ > Also developing similar declarative schema tools — single Go binary, plain SQL as the schema definition. Give it a try.
14
14
  >
15
15
  > * [pistachio](https://github.com/winebarrel/pistachio): for PostgreSQL
16
- > * [myschema](https://github.com/winebarrel/myschema): for MySQL
17
16
 
18
17
  > [!warning]
19
18
  > The order of columns when exporting has changed in Rails 8.1. https://github.com/rails/rails/pull/53281
20
19
  >
21
20
  > If you do not want to sort the columns, use `--disable-sort-columns` option.
22
21
 
23
- > [!note]
22
+ <details>
23
+ <summary>Note</summary>
24
+
24
25
  > * ridgepole v3.2.0
25
26
  > * Use `udiff` instead of `diffy` (cf. https://github.com/ridgepole/ridgepole/pull/657)
26
27
  > * ridgepole v3.1.0
@@ -49,6 +50,8 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
49
50
  > * cf. https://github.com/rails/rails/commit/c2a6f618d22cca4d9b7be7fa7652e7aac509350c#diff-55f41513f027a3d219629f475f03c2d1105ca55c5093d691e1b3dc4710c6cc0b
50
51
  > * SQLite does not support.
51
52
 
53
+ </details>
54
+
52
55
  ## Installation
53
56
 
54
57
  Add this line to your application's Gemfile:
@@ -102,6 +105,7 @@ Usage: ridgepole [options]
102
105
  --drop-table-only
103
106
  --mysql-change-table-options
104
107
  --mysql-change-table-comment
108
+ --pg-change-table-comment
105
109
  --check-relation-type DEF_PK
106
110
  --ignore-table-comment
107
111
  --skip-column-comment-change
@@ -286,6 +290,26 @@ create_table "users", force: :cascade do |t|
286
290
  end
287
291
  ```
288
292
 
293
+ ## Functional Index (MySQL)
294
+
295
+ MySQL 8.0.13 or later supports functional key parts, also known as expression
296
+ indexes. MySQL normalizes these expressions when storing them, and Ridgepole
297
+ compares the normalized expression with the one in your Schemafile. To avoid
298
+ repeated diffs, use the expression produced by `ridgepole --export` in your
299
+ Schemafile.
300
+
301
+ ```ruby
302
+ create_table "users", force: :cascade do |t|
303
+ t.datetime "deleted_at"
304
+ t.string "email", null: false
305
+ t.string "name", null: false
306
+
307
+ t.index "(lower(`name`))", name: "index_users_on_lower_name"
308
+ t.index "(case when (`deleted_at` is null) then `email` else NULL end)",
309
+ name: "index_users_on_active_email", unique: true
310
+ end
311
+ ```
312
+
289
313
  ## Execute
290
314
  ```ruby
291
315
  create_table "authors", force: :cascade do |t|
data/bin/ridgepole CHANGED
@@ -290,7 +290,7 @@ begin
290
290
 
291
291
  differ, _out = delta.migrate if differ
292
292
 
293
- logger.info('No change') if differ
293
+ logger.info('No change') unless differ
294
294
  elsif delta.differ?
295
295
  differ = noop_migrate(delta, options)
296
296
  exit_code = 1 if differ
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ridgepole
4
- VERSION = '3.2.3'
4
+ VERSION = '3.2.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara