Skip to content

Oracles on live servers: catalog equivalence and behaviour #32

Open

Description

@CaffeinatedCoder

The backbone of plan, section 4. Starts with preview.1, grows with each kind.

Change

  • Catalog equivalence: for generated model pairs (A, B), the catalog after migrating A to B equals the catalog of EnsureCreated(B); a second diff is empty after a compiled snapshot round trip; Down returns to A's catalog for reversible changes. Read through pg_get_indexdef, pg_get_constraintdef, sys.*.
  • Behaviour: per kind, writes that must fail do fail and writes that must pass do pass: duplicates under a partial unique index with null keys, overlapping ranges, a deferred constraint at commit. Catalog equality cannot see a renderer that is wrong the same way on both paths.
  • PostgreSQL 16 and 18 and SQL Server 2022 in Testcontainers; a database per test.

Done when

Each oracle has been shown to fail: a seeded ordering mistake for the first, a seeded missing null compensation for the second.

Activity

  1. added this to the 11.0.0 milestone on Nov 11, 2026
  2. added
    tests
    package/postgresql
    package/sqlserver
    area/migrations
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/migrationspackage/postgresqlpackage/sqlservertests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions