fast_schema_dumper 0.5.4 → 0.5.6
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 +12 -0
- data/lib/fast_schema_dumper/fast_dumper.rb +16 -9
- data/lib/fast_schema_dumper/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: 30fb840154cb46da9e3d3db65d6cced9302e67c416ee3eaff4fe561e9747be71
|
|
4
|
+
data.tar.gz: d1c48606904d3721a4baaae88aebe3f65f54b5075b05da4a8c492c3a1e426158
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96ed27c5f3f2296605e7499bef757865e646dc8142e22e13bce6bbe260836c95b1f75d2fa5011d5630d46ab3a1cb78375d0b437ab906c7788e6b3baa58eb4158
|
|
7
|
+
data.tar.gz: e4f53420ac04ada3c0a80239e37db0cd48b4a243be3885a0aa2c7f93ed1976f2df718d27effb4dfbda83205ec188f6cfa54f1edbb3127b445954b9c842ef0607
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.5.6] - 2026-11-11
|
|
4
|
+
|
|
5
|
+
- Fix foreign key column inference for table names ending in common plurals
|
|
6
|
+
such as `releases`, `databases`, and `purchases`. [#67](https://github.com/smartbank-inc/fast_schema_dumper/pull/67)
|
|
7
|
+
|
|
8
|
+
## [0.5.5] - 2026-11-06
|
|
9
|
+
|
|
10
|
+
- Require Active Record 7.2 or later. [#57](https://github.com/smartbank-inc/fast_schema_dumper/pull/57)
|
|
11
|
+
- Test against Active Record 7.2, 8.0 and 8.1 in CI. [#57](https://github.com/smartbank-inc/fast_schema_dumper/pull/57)
|
|
12
|
+
- Fix column option order to dump `collation` before `comment`, matching
|
|
13
|
+
`ActiveRecord::SchemaDumper` output. [#65](https://github.com/smartbank-inc/fast_schema_dumper/pull/65)
|
|
14
|
+
|
|
3
15
|
## [0.5.4] - 2026-08-04
|
|
4
16
|
|
|
5
17
|
- Support MySQL functional indexes (e.g. `INDEX ((LOWER(name)))`). Indexes
|
|
@@ -268,6 +268,13 @@ module FastSchemaDumper
|
|
|
268
268
|
'news' # news is both singular and plural
|
|
269
269
|
when /ies$/
|
|
270
270
|
str.sub(/ies$/, 'y')
|
|
271
|
+
when /(?:\A|_)(?:
|
|
272
|
+
abuses|bases|cases|causes|clauses|closes|databases|defenses|
|
|
273
|
+
excuses|expenses|increases|lapses|licenses|misuses|noises|offenses|
|
|
274
|
+
overdoses|pauses|phases|phrases|premises|promises|pulses|purchases|
|
|
275
|
+
purposes|raises|releases|responses|reuses|reverses|showcases|subcases|uses
|
|
276
|
+
)\z/x
|
|
277
|
+
str.sub(/s\z/, '')
|
|
271
278
|
when /ses$/
|
|
272
279
|
str.sub(/es$/, '')
|
|
273
280
|
when /s$/
|
|
@@ -435,6 +442,15 @@ module FastSchemaDumper
|
|
|
435
442
|
# null
|
|
436
443
|
col_def += ", null: false" if column['IS_NULLABLE'] == 'NO'
|
|
437
444
|
|
|
445
|
+
# collation
|
|
446
|
+
if column['COLLATION_NAME'] && column['DATA_TYPE'] =~ /char|text/
|
|
447
|
+
# Check if it's different from the table's default collation
|
|
448
|
+
# For now, just check if it's utf8mb4_bin which seems to be the special case
|
|
449
|
+
if column['COLLATION_NAME'] == 'utf8mb4_bin'
|
|
450
|
+
col_def += ", collation: \"#{column['COLLATION_NAME']}\""
|
|
451
|
+
end
|
|
452
|
+
end
|
|
453
|
+
|
|
438
454
|
# comment
|
|
439
455
|
if column['COLUMN_COMMENT'] && !column['COLUMN_COMMENT'].empty?
|
|
440
456
|
col_def += ", comment: \"#{escape_string(column['COLUMN_COMMENT'])}\""
|
|
@@ -445,15 +461,6 @@ module FastSchemaDumper
|
|
|
445
461
|
col_def += ", unsigned: true"
|
|
446
462
|
end
|
|
447
463
|
|
|
448
|
-
# collation
|
|
449
|
-
if column['COLLATION_NAME'] && column['DATA_TYPE'] =~ /char|text/
|
|
450
|
-
# Check if it's different from the table's default collation
|
|
451
|
-
# For now, just check if it's utf8mb4_bin which seems to be the special case
|
|
452
|
-
if column['COLLATION_NAME'] == 'utf8mb4_bin'
|
|
453
|
-
col_def += ", collation: \"#{column['COLLATION_NAME']}\""
|
|
454
|
-
end
|
|
455
|
-
end
|
|
456
|
-
|
|
457
464
|
col_def
|
|
458
465
|
end
|
|
459
466
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_schema_dumper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daisuke Aritomo
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 7.2.0
|
|
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:
|
|
25
|
+
version: 7.2.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: bigdecimal
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|