一键导入
ef-migration
Canonical commands and safety rules for EF Core migration management in the Menu repository — adding, removing, and applying migrations correctly.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Canonical commands and safety rules for EF Core migration management in the Menu repository — adding, removing, and applying migrations correctly.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | ef-migration |
| description | Canonical commands and safety rules for EF Core migration management in the Menu repository — adding, removing, and applying migrations correctly. |
| user-invokable | true |
| context | inline |
Use this skill when adding, removing, or reasoning about EF Core migrations in the Menu repository. The project layout requires specific flags that differ from the EF CLI defaults.
backend/MenuDB (contains MenuDbContext and the Migrations/ folder)backend/MenuApi (required for EF tool configuration)backend/), not from a project subfolder.cd backend
dotnet ef migrations add <MigrationName> --project MenuDB --startup-project MenuApi
<MigrationName> should be PascalCase and describe the schema change, e.g. AddRecipeIngredientsTable.
cd backend
dotnet ef migrations remove --project MenuDB --startup-project MenuApi
Only remove a migration that has not been applied to any environment. If the migration is already in the database, revert it first with a new migration.
cd backend
dotnet ef migrations list --project MenuDB --startup-project MenuApi
Menu.MigrationService is a BackgroundService that applies all pending EF migrations on startup and then exits. MenuApi is configured with WaitForCompletion on Menu.MigrationService, so the API never starts before migrations complete.
Do not run dotnet ef database update against a shared or production database. Let Menu.MigrationService manage migration application at runtime.
Entity mappings live in backend/MenuDB/Data/. Column constraints (max length, required, etc.) are configured inside MenuDbContext.OnModelCreating. After adding a migration, always inspect the generated migration file to confirm the SQL it will execute matches your intent before committing.
After adding a migration, build the solution to confirm there are no EF model snapshot conflicts:
cd backend
dotnet restore MenuApi.sln
dotnet build MenuApi.sln --configuration Release --no-restore
Fetch all issues for a GitHub repo, parse Epic task lists, and compute a blocked/unblocked/in-progress/done status for every issue and epic transitively.
Generate a self-contained HTML file containing one or more interactive Mermaid diagrams with dark GitHub-style theming, status-based colour coding, and mouse/button pan-and-zoom via svg-pan-zoom.
Step-by-step guide for adding a new Minimal API endpoint to MenuApi following the layered model pattern (EF Entity → DBModel → ViewModel, Mapperly, repository, service, MapGroup registration).
How to create a new Vogen value object in MenuApi — covering the attribute, assembly-wide defaults, EF Core value converter registration, Swagger mapping, and repository wrapping conventions.
Structured checklist for reviewing pull requests in the Menu repository — layer separation, Vogen coverage, Mapperly attributes, async conventions, and StyleCop compliance.
Conventions for adding a new Vue 3 + Quasar component in the Menu frontend — correct folder, TypeScript Composition API style, co-located Storybook story, and the two-layer API service pattern.