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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e74649c95b51a718a9e5d2d4583adb0eeaa752f72116e4a21235e94b7aed768
4
- data.tar.gz: b17d033b4449cd527eed2b50ab3c5b5851eca822c9329fd8d698d98733bb50e9
3
+ metadata.gz: dfd997d65329c763b3d9a2947bc4729bf705353b670ed92e3c6aeeb4e5a57274
4
+ data.tar.gz: 3997c70bf8503357745c8ade27fd29d07853ab45bf9f992171102f9b5e79baed
5
5
  SHA512:
6
- metadata.gz: 8a94ed1a0bf13a02910a3a7a69f154dc1d5f5926d6bdeafedd5a241855052e6d03507825ad9cf93d2788f59a2ca19e031fd81a370fca578d4b88deed5c9db4fb
7
- data.tar.gz: 53b42423236881b8887180819cee487cad61d90433750a18f5759059dd87dc1460fc98314d512c1f48d451e3d9da284b2e5e7429410d956ccd21b68781a21582
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/[USERNAME]/fast_schema_dumper.
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module FastSchemaDumper
2
- VERSION = "0.4.0"
4
+ VERSION = "0.4.2"
3
5
  end
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.0
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.8.0.dev
78
+ rubygems_version: 3.6.9
62
79
  specification_version: 4
63
80
  summary: A fast alternative to ActiveRecord::SchemaDumper
64
81
  test_files: []