NetBox change-logging limits for schema migration rollback
0 reputation · 15 Feb 2025, 05:51 UTC
NetBox records model changes in its built-in change log, and administrators may want to use that history to reconstruct a pre-migration state after a schema change. The uncertainty is whether this log remains a reliable rollback source when a Django migration is reversed, especially on instances where plugins have extended core models or added custom fields.
Django migrations in NetBox follow the standard framework, so reversing a migration is technically possible, but the interaction between rolled-back schema state and existing change-log entries is not always clear. Plugin data may be left orphaned, and the log may not reflect low-level column changes unless custom signals are used. Assuming NetBox 3.4 or later, where a change-notes field exists on many core models, whether that free-form rationale survives a migration reversal consistently across plugin-extended objects is unclear.
Where does NetBox draw the line between supported change-log-based recovery and unsupported schema rollback scenarios? Specifically:
- Does the built-in change log remain queryable and internally consistent after a Django migration is reversed on a plugin-extended model?
- Are change-log entries for custom fields or plugin-added attributes preserved, or do they become orphaned references when the underlying schema is removed?
- Is there a documented boundary for using change-notes or change history as a rollback aid after schema modifications?