add-dbup

Create sequential DbUp SQL migration scripts with zero-padded PascalCase filenames.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/geobarteam/github-copilot-configs --skill add-dbup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-dbup
Source: https://github.com/geobarteam/github-copilot-configs/tree/main/skills/add-dbup
Command: npx skills add https://github.com/geobarteam/github-copilot-configs --skill add-dbup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines adding DbUp SQL migration scripts by ensuring correct sequential numbering, consistent PascalCase naming, embedded-resource configuration, and safe SQL patterns so migrations execute reliably and in order.

Core Features & Use Cases

  • Sequential numbering: Detects the highest existing numeric prefix and generates the next zero-padded NNNN to avoid collisions and preserve execution order.
  • Naming and safety conventions: Enforces descriptive PascalCase filenames, schema-qualified identifiers, GO terminators, idempotent guards, and guidelines to avoid destructive changes.
  • Verification and alignment: Verifies dotnet build success and prompts developers to align EF Core IEntityTypeConfiguration with the SQL schema; ideal for creating tables, adding columns, seeding data, indexes, and stored procedures.

Quick Start

Create a new script using the next zero-padded number and a PascalCase descriptive name in src/Database/Scripts, then run dotnet build src/Database to confirm compilation before review.

Frequently Asked Questions about add-dbup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add sequential SQL migration scripts to a DbUp database project?

You add SQL migration scripts by placing new files under src/Database/Scripts with the next zero-padded numeric prefix and a PascalCase name, ensuring correct execution order and preventing filename collisions.

Why do my DbUp SQL migrations fail to execute in the correct order?

Migrations fail to execute in order when scripts lack zero-padded numeric prefixes. Enforcing sequential numbering and PascalCase descriptive filenames preserves the intended execution order and prevents script collisions.

Does DbUp require embedded resources for SQL migration files in a .NET project?

Yes, DbUp requires SQL migration files to be configured as EmbeddedResource items in the csproj. This inclusion allows the console Database application to locate and execute the SQL scripts reliably during deployment.

What is the best way to structure safe SQL schema changes for DbUp migrations?

The best way to structure safe SQL schema changes is to use idempotent guards, schema-qualified identifiers, and GO terminators. This approach prevents destructive changes and ensures migrations apply reliably without data loss.

Can I use DbUp SQL migrations alongside EF Core configurations?

Yes, you can use DbUp SQL migrations alongside EF Core. After adding SQL schema changes, you should align your EF Core IEntityTypeConfiguration files to match the database schema modifications applied by the scripts.