Class: SnapshotBlobReference
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- SnapshotBlobReference
- Defined in:
- app/models/snapshot_blob_reference.rb
Overview
Top-level (NOT namespaced under Glib::) by design — see issue #960's hard constraint:
The gem's SnapshotBlobReference must stay a top-level model on table
`snapshot_blob_references` — not namespaced. Drop-in compatibility holds only
because `isolate_namespace` is off in lib/glib/engine.rb. Namespacing it (e.g.
Glib::SnapshotBlobReference → table `glib_snapshot_blob_references`) or enabling
isolate_namespace orphans every existing consumer's table + rows and forces a
rename/data migration.
This file lives at app/models/snapshot_blob_reference.rb (not under app/models/glib/)
so the Rails autoloader resolves the constant as top-level SnapshotBlobReference, which
in turn maps to the un-prefixed table name snapshot_blob_references. The host app's
existing SnapshotBlobReference model can be deleted verbatim when it bumps the gem.
Inherits from the host's ApplicationRecord (the standard since Rails 5.0) so the model
shares the primary DB connection — same pattern as every other top-level host model.