Skip to main content
Schema drift occurs when your database structure , intentionally or accidentally. AnomalyArmor detects drift automatically and alerts you before it causes downstream failures.
Before/after comparison showing column added, removed, and modified

Schema diff visualization showing column changes

What is Schema Drift?

Schema drift is any change to database structure:

Types of Schema Drift

Breaking Changes (High Risk)

Changes that will cause immediate failures:

Non-Breaking Changes (Low-Medium Risk)

Changes that usually don’t cause immediate failures:

How Drift is Detected

AnomalyArmor compares consecutive discovery runs: Detected drift: Column status removed, column order_status added (possibly a rename, investigate).

Detection Timing

For production databases, hourly discovery provides a good balance of timeliness and resource usage.

Viewing Schema Drift

Asset Schema History

  1. Navigate to Assets
  2. Click on a table
  3. Select Schema History tab
You’ll see:
Schema change timeline displaying multiple changes with timestamps and details

Schema change history showing column additions, removals, and modifications over time

Change Details

Click any change to see details:
  • Before state: Previous column definition
  • After state: New column definition (or “Removed”)
  • Detection time: When the change was discovered
  • Discovery run: Which scan found it

Schema Drift Alerts

Setting Up Alerts

Create rules to notify you of drift:

Alert Content

Schema drift alerts include:

Common Drift Scenarios

Scenario 1: Column Rename

Symptom: Column removed + column added with similar name
Action:
  1. Confirm it’s a rename (ask the upstream team)
  2. Update all downstream references
  3. Verify queries work with new name

Scenario 2: Unannounced Migration

Symptom: Multiple columns changed in related tables
Action:
  1. Identify the migration (check with upstream team)
  2. Review impact on your queries
  3. Update affected models

Scenario 3: Table Dropped

Symptom: Table no longer exists
Action:
  1. Verify if intentional
  2. Update any queries referencing it
  3. Check if data was migrated elsewhere

Scenario 4: Type Change

Symptom: Column data type modified
Action:
  1. Review aggregations (SUM, AVG) for precision changes
  2. Check comparisons and arithmetic
  3. Verify no type casting issues

Managing Expected Drift

Planned Schema Changes

When you know changes are coming:
  1. Communicate: Tell your team about upcoming changes
  2. Prepare: Update downstream code in advance (staged rollout)
  3. Execute: Make the schema change
  4. Verify: Confirm AnomalyArmor detects it
  5. Acknowledge: Mark alerts as expected

Disabling Rules During Migrations

For large migrations:
  1. Go to Alerts → Rules
  2. Toggle OFF relevant rules
  3. Perform migration
  4. Review detected changes
  5. Toggle rules back ON
Don’t forget to re-enable rules after migration! Set a calendar reminder.

Drift Prevention

Schema Versioning

Coordinate schema changes with version control:
  • Use migration tools (Flyway, Alembic, Atlas)
  • Review migrations before applying
  • Test in staging first

Change Communication

Establish processes:
  • Schema change announcements
  • Dependency mapping
  • Impact assessment before changes

Backward Compatibility

When changing schemas:
  • Add new columns instead of modifying existing
  • Keep old columns during transition periods
  • Use views to maintain compatibility

Troubleshooting

This is expected behavior. AnomalyArmor doesn’t know intent. It reports all changes. Consider:
  1. Acknowledging the alert
  2. Documenting the change in your records
  3. Disabling rules during planned migrations
  1. Check discovery schedule: Has discovery run since the change?
  2. Check scope: Is the table in a monitored schema?
  3. Check permissions: Can AnomalyArmor user see the table?
  4. Run manual discovery: Trigger discovery to check now
  1. Filter by change type: Alert only on breaking changes (removed columns/tables)
  2. Exclude dev/test: Don’t monitor volatile environments
  3. Use patterns: Exclude *_temp, *_backup tables
This is expected. AnomalyArmor can’t automatically determine if a remove+add pair is a rename. You should:
  1. Investigate the pair manually
  2. Document the rename in your records
  3. Update downstream references

Best Practices

  1. Monitor production closely: Run frequent discovery, alert immediately
  2. Differentiate environments: Different rules for prod vs. dev
  3. Route by change type: Breaking changes → PagerDuty; additions → Email
  4. Review history regularly: Check drift patterns to identify risky areas
  5. Coordinate changes: Communicate schema changes before making them

Common Questions

What counts as a breaking schema change?

Column removals, table removals, column renames, and incompatible type changes (such as varchar to integer) will break queries immediately. Additions and compatible type widenings (varchar(50) to varchar(100)) usually don’t.

How do I avoid alert storms during a planned migration?

Disable the relevant alert rules in Alerts → Rules before the migration, let the changes flow through, then toggle the rules back on. Set a calendar reminder, leaving rules off is a common mistake.

Can AnomalyArmor detect renames automatically?

No. A rename shows up as a column removed plus a column added with a similar name. The UI flags the pair as a possible rename, but confirming intent still requires a human to check with the upstream team.

Why did drift get detected for a change I made intentionally?

AnomalyArmor reports all structural changes, it has no way to know which ones you planned. Acknowledge the alert, document the change, and optionally disable the rule during known migration windows.

What should I do first when a breaking change is detected in production?

Open the asset’s schema history to see exactly what changed and when. Then check downstream dependencies, such as views, models, and dashboards, that reference the affected column or table, and coordinate fixes before more queries fail.

Does detection work on views and materialized views, not just tables?

Yes. Discovery catalogs tables, views, and their underlying columns, so drift on views is detected the same way. See Asset Discovery for what’s captured.

Schema Monitoring Overview

Broader schema monitoring capabilities

Alert Rules

Configure drift alerts

Schema Changes Concept

Deep dive into change types

Asset Discovery

How assets are discovered