ridgepole 3.2.3 → 3.2.5
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 +8 -0
- data/README.md +28 -4
- data/bin/ridgepole +2 -2
- data/lib/ridgepole/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: abd4de93bb4a0d0938356df4090e8f4c703f0e8cb17e4b4c886174aed0fc757c
|
|
4
|
+
data.tar.gz: d0e95a3692a07834a515a833500918c01fca28dcdf38bda90dc9a4974f1efccf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef67a2f85f7d9d510384409483a52c9ea7620d8bc85219d14ab26818759e85d603f6aa22c1c8a3a3e40cf1f7f15f9093810bb03c5c1737091d5afe770c7d62a4
|
|
7
|
+
data.tar.gz: 7a6320a5a28a23a8fbeed7448b1715c845e7985d8d45a3f7ef9ed7d17c4246b20a2e407790daebbf0795e10462c2e121ad74ce472015c7a9810c30aa19194e11
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## 3.2
|
|
4
4
|
|
|
5
|
+
### 3.2.5 (2026/08/11)
|
|
6
|
+
|
|
7
|
+
- Fix `--with-apply` validation to require `--config`. [pull#733](https://github.com/ridgepole/ridgepole/pull/733)
|
|
8
|
+
|
|
9
|
+
### 3.2.4 (2026/08/08)
|
|
10
|
+
|
|
11
|
+
- Fix inverted "No change" log in `--diff --with-apply`. [pull#730](https://github.com/ridgepole/ridgepole/pull/730)
|
|
12
|
+
|
|
5
13
|
### 3.2.3 (2026/08/01)
|
|
6
14
|
|
|
7
15
|
- 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
|
@@ -168,7 +168,7 @@ ARGV.options do |opt|
|
|
|
168
168
|
|
|
169
169
|
opt.parse!
|
|
170
170
|
|
|
171
|
-
if !mode || (%i[apply export].include?(mode) && !config) || (
|
|
171
|
+
if !mode || (%i[apply export].include?(mode) && !config) || (diff_with_apply && !config)
|
|
172
172
|
puts opt.help
|
|
173
173
|
exit 1
|
|
174
174
|
end
|
|
@@ -290,7 +290,7 @@ begin
|
|
|
290
290
|
|
|
291
291
|
differ, _out = delta.migrate if differ
|
|
292
292
|
|
|
293
|
-
logger.info('No change')
|
|
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
|
data/lib/ridgepole/version.rb
CHANGED
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.
|
|
4
|
+
version: 3.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
@@ -245,14 +245,14 @@ dependencies:
|
|
|
245
245
|
requirements:
|
|
246
246
|
- - '='
|
|
247
247
|
- !ruby/object:Gem::Version
|
|
248
|
-
version: 1.
|
|
248
|
+
version: 1.89.0
|
|
249
249
|
type: :development
|
|
250
250
|
prerelease: false
|
|
251
251
|
version_requirements: !ruby/object:Gem::Requirement
|
|
252
252
|
requirements:
|
|
253
253
|
- - '='
|
|
254
254
|
- !ruby/object:Gem::Version
|
|
255
|
-
version: 1.
|
|
255
|
+
version: 1.89.0
|
|
256
256
|
- !ruby/object:Gem::Dependency
|
|
257
257
|
name: rubocop-rake
|
|
258
258
|
requirement: !ruby/object:Gem::Requirement
|