Skip to content

[Skill]: schema-migrations-safely should explicitly separate greenfield migration squashing from live expand-contract #88

Open

Description

Which plugin

microsoft-sql

Which skill

schema-migrations-safely

What kind of problem

The skill was missing something it needed to say

Which agent or host

GitHub Copilot (CLI)

How did you install the plugin or skills

GitHub Copilot plugin marketplace

Plugin and host versions

microsoft-sql version not surfaced by the host; GitHub Copilot CLI 1.0.84-5

What happened

During a greenfield implementation with no deployed database, review and implementation cycles treated intermediate EF migrations as if they were already consumed by production. Considerable work went into adding follow-up migrations, testing upgrade paths, and then later consolidating them.

The skill provides strong live-database doctrine but does not prominently say that before the first deployment, it is usually appropriate to discard and regenerate a clean initial migration.

What the skill said, and what worked instead

It emphasizes expand/backfill/contract, schema locks, idempotence, and safe live changes.

What would have helped:

Add an early branch:

  • No environment has applied the migration: freely revise the model and regenerate/squash into one reviewed initial migration.
  • Any shared or production-like environment has applied it: never rewrite history; use expand/backfill/contract and forward-only repair.

Require the agent to establish which state applies before reviewing migration safety.

Steps to reproduce

  1. Create a greenfield EF Core Azure SQL project.
  2. Generate an initial migration.
  3. Revise the schema repeatedly before deployment.
  4. Ask for safe migration guidance.
  5. Observe that live migration doctrine can be applied prematurely without an explicit environment-state gate.

Additional context

The live migration guidance itself is valuable and should remain unchanged after the first deployment.

Confirmation

  • This is about a plugin or agent skill published by this repository.
  • I removed passwords, connection strings, tokens, customer data, and other secrets.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions