Backward compatible schema changes

From CarlosCaPe/octorato · View interactive version

Backward compatible schema changes is an AI agent skill from the GitHub repository CarlosCaPe/octorato. Backward-Compatible Schema Changes

How to use this skill

Skill file

Backward-Compatible Schema Changes

What

Making database schema changes that don't break existing application code.

The application continues working without any code changes, even though the

database structure has been modified.

Why

In production systems, you can't deploy database changes and application

changes at the exact same millisecond. There's always a window where the

old app code runs against the new schema (or vice versa). Backward-compatible

changes eliminate this risk.

How

Column renames with preserved parameter names

-- The procedure parameter keeps the OLD name
CREATE OR REPLACE PROCEDURE public."AddApplicant"(
    ...
    "p_vertirnarytechorassistant" boolean,  -- old spelling preserved
    ...
)
AS $$
BEGIN
    INSERT INTO public."Applicant" (
        ...
        "the clientTechOrAssistant",  -- new spelling in column ref
        ...
    ) VALUES (
        ...
        p_vertirnarytechorassistant,  -- old spelling in param ref (no quotes)
        ...
    );
END;
$$ LANGUAGE plpgsql;

The application calls:

CALL public."AddApplicant"(
    p_vertirnarytechorassistant => true  -- still works!
);

The principle

| Layer | What Changed | What Stayed |

|-------|-------------|-------------|

| Table column name | "VertirnaryTechOrAssistant" -> "the clientTechOrAssistant" | Data, type, constraints |

| Procedure body | Quoted column refs updated | Everything else |

| Procedure signature | Nothing | Parameter names, types, order |

| Application code | Nothing | Call syntax, parameter binding |

When to Use

Where We Used It

all p_ parameter names. Application code continues working unchanged.

Parameter name cleanup deferred to a future ticket after app coordination.

Gotchas

positional binding is not


Category: Strategy | Origin:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.