Skip to content

Migration Strategy

Purpose

The Migration Strategy defines how Algosure database changes should be planned, reviewed, and released.

Rules

Rule Requirement
Module-owned migrations The owning module owns migrations for its tables.
Forward-only by default Changes should be forward-moving and safe for release pipelines.
Backward compatibility Application and database changes should support safe rollout where possible.
Destructive changes require review Drops, truncations, type changes, and data rewrites require explicit approval.
Data migrations are governed Backfills and transformations require ownership, validation, and rollback thinking.
Tenant safety Tenant-scoped data migrations require tenant-aware filters and validation.

Migration Lifecycle

flowchart LR
    Spec[Database Spec]
    ChangeSet[Migration ChangeSet]
    Review[Review]
    Test[Test]
    Apply[Apply]
    Verify[Verify]

    Spec --> ChangeSet --> Review --> Test --> Apply --> Verify

Required Review Topics

  • Owning module and Domain.
  • Tenant and organization impact.
  • Backward compatibility with application code.
  • Data classification and audit impact.
  • Index and lock impact.
  • Rollback or recovery approach.
  • Production verification plan.

Non-Goals

This document does not define CI/CD implementation, rollback tooling, deployment topology, or environment promotion process.