fast_schema_dumper 0.5.1 → 0.5.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: 6a03268e6929c7112bcb46f47c8391d1f488f996aaf6fbd6aa240d5dba3aaa4d
4
- data.tar.gz: 367f8710027df425835f56f1df0daad9092df75173b35bb93c7415fc5a844447
3
+ metadata.gz: 318d9557a32b7d943e100a40a1a707842f0f1e7cc9465b95f5294c3e495dd5e3
4
+ data.tar.gz: 6fa2494751fe0027a52abeac9e7cdb66dcce881139c855a074eb0cf90e8f11c0
5
5
  SHA512:
6
- metadata.gz: b8e2ce6947ad22c3ac8c32327fda4c3c57bf1583d7e428d4cf57f76372637e7ce67f8b45d0bbbffcb44312e2fb25a612ecde0656131a06c01eaed68c24d2d498
7
- data.tar.gz: 9c53c15564bda435c045fdacd0d85ed5f638fad82e1d43a3c772475f66c95ab574bb00a59a4714a0be8f0e9fcca5f8a956fd4e98fc0c792649e0517b86373ceb
6
+ metadata.gz: 3fa88e9595021d89571795e8b9c0ce2cdb17f3fed68a3e357cb5572ec1e710f1b29f2c6235942d583a13f2946abb1998544edd18b0ec544587a7b7f3d4f12b7d
7
+ data.tar.gz: 935ab57a56740cd0f0fb75b650cae3f258e6e583da5a05e4af357eef6724530c1750b4205fa4e80b9a6bca416ff2e13f4f5738a183341d503d05fcb55a3164ad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.2] - 2026-04-15
4
+
5
+ - Fix generated column dump order to match ActiveRecord::SchemaDumper. [#32](https://github.com/smartbank-inc/fast_schema_dumper/pull/32)
6
+ - Fix generated column expression dump to align with Rails output. [#33](https://github.com/smartbank-inc/fast_schema_dumper/pull/33)
7
+ - Use include-based assertions in schema dumper tests. [#31](https://github.com/smartbank-inc/fast_schema_dumper/pull/31)
8
+
3
9
  ## [0.5.1] - 2026-04-13
4
10
 
5
11
  - Add unit tests for pure private methods in `FastSchemaDumper::SchemaDumper`. [#27](https://github.com/smartbank-inc/fast_schema_dumper/pull/27)
@@ -437,9 +437,11 @@ module FastSchemaDumper
437
437
  end
438
438
 
439
439
  def format_generated_column(column)
440
- col_def = "t.virtual \"#{column['COLUMN_NAME']}\", type: :#{map_column_type(column)}, as: \"#{escape_string(column['GENERATION_EXPRESSION'])}\""
441
- col_def += ", stored: true" if stored_generated_column?(column)
440
+ col_def = "t.virtual \"#{column['COLUMN_NAME']}\", type: :#{map_column_type(column)}"
441
+ expression = column['GENERATION_EXPRESSION'].gsub("\\'", "'")
442
442
  col_def += ", comment: \"#{escape_string(column['COLUMN_COMMENT'])}\"" if column['COLUMN_COMMENT'] && !column['COLUMN_COMMENT'].empty?
443
+ col_def += ", as: \"#{escape_string(expression)}\""
444
+ col_def += ", stored: true" if stored_generated_column?(column)
443
445
  col_def
444
446
  end
445
447
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastSchemaDumper
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Aritomo