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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +28 -4
- data/bin/ridgepole +1 -1
- data/lib/ridgepole/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30883571738ca7fb36863b862ea2c3c447dd2b557065c60c1c1a21a66beddb42
|
|
4
|
+
data.tar.gz: 425b7bc6cc0f9efffa9ea3b02fe681db1a242d1d2b41fcceee2d463082a7c866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
1
|
+

|
|
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
|
[](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
|
-
>
|
|
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
data/lib/ridgepole/version.rb
CHANGED