fast_schema_dumper 0.4.0 → 0.4.2
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 +14 -0
- data/README.md +5 -2
- data/lib/fast_schema_dumper/fast_dumper.rb +8 -0
- data/lib/fast_schema_dumper/version.rb +3 -1
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dfd997d65329c763b3d9a2947bc4729bf705353b670ed92e3c6aeeb4e5a57274
|
|
4
|
+
data.tar.gz: 3997c70bf8503357745c8ade27fd29d07853ab45bf9f992171102f9b5e79baed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d1182a9edbe7099fcb22c9d40cb0548e6a261d2e1239e840d5f5e9bf96d44f7c23d2014ad534a561fca2e4b28fc0b309b9025cc4571d19581c932f6014e5e43
|
|
7
|
+
data.tar.gz: a6007f94ad89cfd25efe63ad78037a9aa8cfc861e547c90fea76e4453321025dc1ab0c5acd960b67a5376aac17da738bb47840e15fe6de509b442c0371dee477
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
## [0.4.0] - 2025-11-06
|
|
4
|
+
|
|
5
|
+
## [0.3.0] - 2025-10-31
|
|
6
|
+
|
|
7
|
+
- Support handling of CHECK constraints. [#1](https://github.com/smartbank-inc/fast_schema_dumper/pull/1)
|
|
8
|
+
- Always dump `orig.txt` and `fast.txt` in verify mode.
|
|
9
|
+
|
|
10
|
+
## [0.2.0] - 2025-10-03
|
|
11
|
+
|
|
12
|
+
## [0.1.0] - 2025-07-10
|
|
13
|
+
|
|
14
|
+
- Initial release
|
data/README.md
CHANGED
|
@@ -24,7 +24,6 @@ The Ridgepole integration is configurable via envionment variables.
|
|
|
24
24
|
|
|
25
25
|
I recommend using only fast_schema_dumper in local development environments, and configuring `FAST_SCHEMA_DUMPER_MODE=verify` in CI setups.
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
## Installation
|
|
29
28
|
|
|
30
29
|
Install the gem and add to the application's Gemfile by executing:
|
|
@@ -47,4 +46,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
47
46
|
|
|
48
47
|
## Contributing
|
|
49
48
|
|
|
50
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/smartbank-inc/fast_schema_dumper.
|
|
50
|
+
|
|
51
|
+
## Releasing
|
|
52
|
+
|
|
53
|
+
Kick the GitHub Actions workflow.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'json'
|
|
2
|
+
require 'bigdecimal'
|
|
2
3
|
|
|
3
4
|
module FastSchemaDumper
|
|
4
5
|
class SchemaDumper
|
|
@@ -486,6 +487,13 @@ module FastSchemaDumper
|
|
|
486
487
|
when 'datetime', 'timestamp'
|
|
487
488
|
return '-> { "CURRENT_TIMESTAMP" }' if default == 'CURRENT_TIMESTAMP'
|
|
488
489
|
"\"#{default}\""
|
|
490
|
+
when 'decimal'
|
|
491
|
+
# Same as Rails: activemodel/lib/active_model/type/decimal.rb#type_cast_for_schema
|
|
492
|
+
BigDecimal(default).to_s.inspect
|
|
493
|
+
when 'float', 'double'
|
|
494
|
+
# Same as Rails: activemodel/lib/active_model/type/float.rb#type_cast_for_schema
|
|
495
|
+
# MySQL double is mapped to Type::Float in Rails
|
|
496
|
+
default.to_f.inspect
|
|
489
497
|
when 'json'
|
|
490
498
|
default == "'[]'" ? '[]' : '{}'
|
|
491
499
|
else
|
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.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daisuke Aritomo
|
|
@@ -23,13 +23,30 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: bigdecimal
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
26
40
|
email:
|
|
27
41
|
- osyoyu@osyoyu.com
|
|
42
|
+
- over.rye@gmail.com
|
|
43
|
+
- moznion@mail.moznion.net
|
|
28
44
|
executables:
|
|
29
45
|
- fast_schema_dumper
|
|
30
46
|
extensions: []
|
|
31
47
|
extra_rdoc_files: []
|
|
32
48
|
files:
|
|
49
|
+
- CHANGELOG.md
|
|
33
50
|
- README.md
|
|
34
51
|
- Rakefile
|
|
35
52
|
- exe/fast_schema_dumper
|
|
@@ -58,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
58
75
|
- !ruby/object:Gem::Version
|
|
59
76
|
version: '0'
|
|
60
77
|
requirements: []
|
|
61
|
-
rubygems_version: 3.
|
|
78
|
+
rubygems_version: 3.6.9
|
|
62
79
|
specification_version: 4
|
|
63
80
|
summary: A fast alternative to ActiveRecord::SchemaDumper
|
|
64
81
|
test_files: []
|