Class: OnlineMigrations::DataMigrations::SplitSharedAmazonContentSpecRows::Item
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OnlineMigrations::DataMigrations::SplitSharedAmazonContentSpecRows::Item
- Defined in:
- lib/online_migrations/data_migrations/split_shared_amazon_content_spec_rows.rb
Overview
Local shims, per AGENTS.md: a data migration must not reference app
models, or a behind environment replaying the chain crashes once the
constant is renamed or deleted — which breaks bin/deploy. They also
make the split callback-free, so no Mobility compaction or spec-refresh
hook can fire mid-clone and there is nothing to opt out of.
rubocop:disable Rails/ApplicationRecord -- inheriting ApplicationRecord
would pull back the app-level callbacks and default scopes these shims
exist to avoid. Rubocop already exempts db/**/*.rb for exactly this
reason; migration classes that live under lib/ get no such exemption.
Only the table is needed — the render refresh below deliberately goes
through the app model, since re-rendering is app behaviour a shim can't
carry. Declared first so ProductSpecification can name it without
hardcoding a namespace: the gem loads these classes under
OnlineMigrations::BackgroundDataMigrations, not the DataMigrations
path they are filed under, so a literal class_name string won't resolve.