fast_schema_dumper 0.5.1 → 0.5.3

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: 7d3a6108bbb29f59b67eac0c9e06b9e67824e926802366cedf34138fe7fea734
4
+ data.tar.gz: 2c0e7a71656edb9832b024c97094ef0971c5a9ceb836f44225933f85d1821e82
5
5
  SHA512:
6
- metadata.gz: b8e2ce6947ad22c3ac8c32327fda4c3c57bf1583d7e428d4cf57f76372637e7ce67f8b45d0bbbffcb44312e2fb25a612ecde0656131a06c01eaed68c24d2d498
7
- data.tar.gz: 9c53c15564bda435c045fdacd0d85ed5f638fad82e1d43a3c772475f66c95ab574bb00a59a4714a0be8f0e9fcca5f8a956fd4e98fc0c792649e0517b86373ceb
6
+ metadata.gz: d4cf177c3a6e7dfa18bbf2018b28555beff7d58fbb2781f3a589850d9deaeb5203577aed31612098e15c5ed79240e3deb9f1de4b5ebbac5b992148f7b96c98d5
7
+ data.tar.gz: 40779b25d4c21165b35af9cdb40900b40f4ad3bb1968d9fc85cc30ec50e4b78eb0b84254cd6e74bc5a504d78e257d33b0659a60aa6d92ebe977c219a55329225
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.3] - 2026-05-18
4
+
5
+ - Add limit handling for binary/varbinary columns in format_column. [#39](https://github.com/smartbank-inc/fast_schema_dumper/pull/39)
6
+
7
+ ## [0.5.2] - 2026-04-15
8
+
9
+ - Fix generated column dump order to match ActiveRecord::SchemaDumper. [#32](https://github.com/smartbank-inc/fast_schema_dumper/pull/32)
10
+ - Fix generated column expression dump to align with Rails output. [#33](https://github.com/smartbank-inc/fast_schema_dumper/pull/33)
11
+ - Use include-based assertions in schema dumper tests. [#31](https://github.com/smartbank-inc/fast_schema_dumper/pull/31)
12
+
3
13
  ## [0.5.1] - 2026-04-13
4
14
 
5
15
  - Add unit tests for pure private methods in `FastSchemaDumper::SchemaDumper`. [#27](https://github.com/smartbank-inc/fast_schema_dumper/pull/27)
@@ -386,6 +386,11 @@ module FastSchemaDumper
386
386
  col_def += ", limit: 3"
387
387
  end
388
388
 
389
+ # limit (binary, varbinary)
390
+ if ['binary', 'varbinary'].include?(column['DATA_TYPE']) && column['CHARACTER_MAXIMUM_LENGTH']
391
+ col_def += ", limit: #{column['CHARACTER_MAXIMUM_LENGTH']}"
392
+ end
393
+
389
394
  # size (text)
390
395
  if column['DATA_TYPE'] == 'mediumtext'
391
396
  col_def += ", size: :medium"
@@ -437,9 +442,11 @@ module FastSchemaDumper
437
442
  end
438
443
 
439
444
  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)
445
+ col_def = "t.virtual \"#{column['COLUMN_NAME']}\", type: :#{map_column_type(column)}"
446
+ expression = column['GENERATION_EXPRESSION'].gsub("\\'", "'")
442
447
  col_def += ", comment: \"#{escape_string(column['COLUMN_COMMENT'])}\"" if column['COLUMN_COMMENT'] && !column['COLUMN_COMMENT'].empty?
448
+ col_def += ", as: \"#{escape_string(expression)}\""
449
+ col_def += ", stored: true" if stored_generated_column?(column)
443
450
  col_def
444
451
  end
445
452
 
@@ -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.3"
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Aritomo