Releases: rroblak/seed_dump
Releases · rroblak/seed_dump
v3.4.1
Full Changelog: v3.4.0...v3.4.1
v3.4.0
What's New
This is a major maintenance release that addresses many long-standing issues and adds new features.
New Features
UPSERT_ALLoption (#104): Preserves original record IDs using Rails 6+upsert_all, fixing foreign key references becoming invalid after reimportINSERT_ALLoption (#153): Bulk insert using Rails 6+insert_allfor faster importsINCLUDE_ALLoption (#147): Include all columns, cleaner alternative toEXCLUDE=""MODEL_LIMITSoption (#142): Per-model limit overrides (e.g.,MODEL_LIMITS="Teacher:0,Student:50")HEADERoption (#126): Add a comment header with timestamp and copyable rake command to seed files
Bug Fixes
- Foreign key ordering (#78, #83): Models now dumped in dependency order based on
belongs_toassociations - STI deduplication (#120): STI subclasses no longer create duplicate seed entries
- HABTM deduplication (#26, #114): HABTM models sharing the same join table are deduplicated
- HABTM private constants (#130): Use
const_getfor HABTM join models to avoidNameErroron import - Timezone preservation (#111): Use ISO 8601 format for datetime dumps to preserve timezone info
- ActionText support (#154): Handle
ActionText::Contentin seed dumps correctly - Tables without primary key (#167): Handle ordering for tables without a primary key (also fixes #138, #123 duplicate records bug)
- default_scope with select (#165): Handle
default_scopewithselectin COUNT queries - Nested Time/BigDecimal (#105): Handle
Time/BigDecimalvalues in nested Hashes and Arrays - Non-model AR descendants (#112): Handle abstract classes and other non-model
ActiveRecord::Basedescendants - Model names ending in 's' (#121): Fix incorrect singularization (e.g., "Boss" → "Bos")
- Pipe compatibility (#150): Use write-only file modes for
/dev/stdoutand pipe compatibility - CarrierWave uploaders (#117): Uploader columns now dump correctly instead of nil
- Batch size output (#127):
BATCH_SIZEnow outputs separate method calls per batch
Other Improvements
- Added
created_on/updated_onto default excludes (#128) - Date/time formatting updated to use
to_fs(:db)when available (#163) - Major test suite refactoring with DatabaseCleaner and improved RSpec setup
- Added Appraisals for testing against Rails 6.1, 7.0, 7.1, 7.2, and 8.0
- Upgraded rspec to 3.13 for Ruby 3.4 compatibility
- Updated README with documentation for all new features
Full Changelog: v3.3.1...v3.4.0