filiptrivan/spiderly/ef-migrations

Claude Code and agent skill by filiptrivan/spiderly

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Create and apply EF Core migrations in Spiderly projects. Use when adding, modifying, or removing entity properties, changing column types, renaming columns, or any database schema change that requires a migration.

Install

npx vskill@latest install filiptrivan/spiderly/ef-migrations

SKILL.md

EF Migrations

Creating a migration

Run from the Backend directory, using the Migrations console project as startup (avoids DLL locking — no need to stop the running backend):

bash
dotnet ef migrations add <MigrationName> --project <InfrastructureProject> --startup-project <MigrationsProject>

Example:

bash
cd MyApp/Backend
dotnet ef migrations add AddOrderNumberToProduct --project MyApp.Infrastructure --startup-project MyApp.Migrations

Always review the generated migration file before proceeding.

Relationship schema is declarative — let the migration reflect it

Schema produced by relationship attributes ([WithMany] FKs, [M2M] join tables, [WithOne] one-to-one) is configured in the model (OnModelCreating extensions), so the migration just reflects it — you don't hand-write that DDL. In particular, a one-to-one (`[WithOne]`) auto-emits a unique index on the FK: do not add [Index(IsUnique = true)] yourself, and don't hand-write a CREATE UNIQUE INDEX. For an optional 1-1 (nullable FK) the index must allow many NULLs — that's left to provider conventions (Postgres NULLS DISTINCT, SQL Server's auto IS NOT NULL filter), so never add a HasFilter. If the generated migration shows a filtered/NULL-collapsing unique index on a nullable 1-1 FK, something is wrong — investigate rather than editing the migration by hand.

Applying locally

After creating a migration, always apply it to your local database:

bash
dotnet ef database update --project <InfrastructureProject> --startup-project <MigrationsProject>

Data migrations

When a schema change requires data conversion (e.g., converting 0 to NULL after making a column nullable), add migrationBuilder.Sql() calls inside the Up method. Keep them simple and idempotent.

Production

Schema changes are applied to production automatically through the deployment pipeline. Never run DDL (ALTER TABLE, DROP COLUMN, CREATE INDEX, etc.) directly against the production database.

Direct production DB access (via db-query or psql) is only for data queries and data updates (SELECT, INSERT, UPDATE of row values) — not for schema changes.

The Migrations project

Each Spiderly solution includes a lightweight console app (e.g., MyApp.Migrations) specifically for running EF tooling. It exists because the main WebAPI project's DLLs are often locked by the running dev server. Always use it as the --startup-project for dotnet ef commands.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
60
Repository forks
24
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/filiptrivan/spiderly/ef-migrations/badge)](https://verified-skill.com/skills/filiptrivan/spiderly/ef-migrations)

Something wrong with this skill or its page? Tell us.