Uh oh!
There was an error while loading. Please reload this page.
OCTO-893: Deprecate Migrator.ignore_tables/ignore_models in favor of DeclareSchema.ignore_tables/ignore_models - #188
Conversation
…ls deprecation Documents the plan to move the ignore_tables and ignore_models settings from the internal Migrator class to the public DeclareSchema module, deprecating the old settings in place (no removal, no major version bump). Co-authored-by: Cursor <cursoragent@cursor.com>
…recation Co-authored-by: Cursor <cursoragent@cursor.com>
Move ignore_tables and ignore_models to ::DeclareSchema, following the same delegate+deprecate pattern already used for default_charset and default_collation. The Migrator accessors keep working but emit an ActiveSupport deprecation warning; nothing is removed. Co-authored-by: Cursor <cursoragent@cursor.com>
Update the README Ignored Tables section to point at the new public DeclareSchema.ignore_tables setting, and add a new Ignored Models section documenting DeclareSchema.ignore_models. Both note that the old Migrator-based settings are deprecated aliases. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds DeclareSchema.ignore_tables/ignore_models (OCTO-893), deprecating the old Migrator-based settings without removing them. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR moves the ignore_tables / ignore_models configuration from the internal Generators::DeclareSchema::Migration::Migrator class onto the public ::DeclareSchema module, while keeping the old migrator accessors working via delegation and emitting deprecation warnings.
Changes:
- Added
::DeclareSchema.ignore_tablesand::DeclareSchema.ignore_modelsas new public configuration settings (defaulting to[]). - Deprecated
Generators::DeclareSchema::Migration::Migrator.ignore_tables/.ignore_models(delegated to::DeclareSchemaand wrapped withActiveSupport::Deprecation), and updated internal generator code paths to use::DeclareSchemadirectly to avoid warning spam. - Updated specs + README, and bumped version to
4.1.0with a matching CHANGELOG entry.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/lib/generators/declare_schema/migration/migrator_spec.rb | Adds specs verifying delegation + deprecation warnings for the old Migrator accessors. |
| spec/lib/declare_schema/migration_generator_spec.rb | Updates integration spec to use the new public ::DeclareSchema.ignore_tables API. |
| README.md | Documents DeclareSchema.ignore_tables and adds documentation for DeclareSchema.ignore_models, with deprecation notes for old Migrator APIs. |
| lib/generators/declare_schema/migration/migrator.rb | Delegates + deprecates ignore_tables / ignore_models on Migrator; updates internal callers to ::DeclareSchema.* to avoid warning spam. |
| lib/declare_schema/version.rb | Bumps gem version to 4.1.0. |
| lib/declare_schema.rb | Introduces the new ::DeclareSchema.ignore_tables / ignore_models settings and defaults. |
| Gemfile.lock | Updates local gem version entry to 4.1.0. |
| docs/superpowers/specs/2026-07-03-ignore-tables-deprecation-design.md | Adds design documentation for the deprecation/migration approach. |
| docs/superpowers/plans/2026-07-03-ignore-tables-ignore-models-deprecation.md | Adds an implementation plan documenting steps and rationale. |
| CHANGELOG.md | Adds a 4.1.0 entry documenting the addition + deprecation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The shared deprecator used by default_charset/default_collation and the new ignore_tables/ignore_models had a stale '1.0' horizon (already long past the current 4.1.0). Bump it to 5.0, and update the README to state explicitly that the deprecated Migrator settings will be removed in that version. Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Validate DeclareSchema.ignore_tables=/ignore_models= inputs (Array or nil, with nil normalized to []) so a bad value raises a clear ArgumentError instead of crashing later on .map, matching the existing validation pattern for other DeclareSchema settings. Also reset DeclareSchema.ignore_tables after the migration generator spec that sets it, so the global setting does not leak into later examples. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Summary
::DeclareSchema.ignore_tablesand::DeclareSchema.ignore_modelsas the new public settings for ignoring tables/models during migration generationGenerators::DeclareSchema::Migration::Migrator.ignore_tables/.ignore_models(kept working viadelegate, emits anActiveSupport::Deprecationwarning) using the same pattern already established fordefault_charset/default_collation4.1.0(minor - new backward-compatible API, non-breaking deprecation, nothing removed)Fixes OCTO-893
Test plan
#ignore_tables/#ignore_modelsspecs tomigrator_spec.rbcovering delegation and deprecation warnings (mirrors existing#default_charset/#default_collationspecs)bundle exec rspec(276 examples, 0 failures)Made with Cursor