بنقرة واحدة
migration-creator
// Creates EF Core migrations for master or tenant databases. Use when adding new entities, modifying existing ones, or changing relationships. Follow the workflow to ensure correct migration generation and application.
// Creates EF Core migrations for master or tenant databases. Use when adding new entities, modifying existing ones, or changing relationships. Follow the workflow to ensure correct migration generation and application.
Scaffold a full vertical slice for a new domain feature in LogisticsX — entity, EF configuration, migration, command/query handlers, controller, DTO/mapper, Angular page, and feature-map row. Use when the user asks to add a new top-level feature (e.g., "add a Subcontractor entity with CRUD"). Outputs an ordered checklist tailored to the LogisticsX folder structure.
Add a new tool to the AI dispatch agent. Use when the user wants to give the agent a new capability (e.g., "add a tool that returns load board listings older than 24h"). Walks through the four files that must change and the silently load-bearing WriteTools step.
Add a new LLM provider or model to the AI dispatch system. Use when adding a new model from an existing provider (e.g., a new Claude version) or wiring up a new OpenAI-compatible endpoint. Walks through the seven places that must change to keep pricing, quotas, and UI dropdowns in sync.
Add a new plan-gated tenant feature flag (e.g. "ContainerTracking", "AdvancedAnalytics") that can be toggled per-tenant and gated by subscription plan tier. Use when adding a feature that should be: locked for some plans, opt-in per tenant, or admin-overridable. Walks through the four-tier resolution chain.
Add a new external webhook receiver (Stripe, ELD, custom integration). Use when wiring an inbound webhook from a third-party service. Codifies signature validation, idempotency, audit logging, and the WebhookController + Application/Commands/Webhooks pattern so security checks are not silently skipped.
Stage changes and create a git commit with a well-crafted message following conventional commit style.
| name | migration-creator |
| description | Creates EF Core migrations for master or tenant databases. Use when adding new entities, modifying existing ones, or changing relationships. Follow the workflow to ensure correct migration generation and application. |
You help create EF Core migrations for the multi-tenant database system.
Master DB: Contains Tenants, Subscriptions, SuperAdmin users
MasterDbContextLogistics.Infrastructure.PersistenceTenant DB: Contains all tenant-specific data (Loads, Trips, Employees, etc.)
TenantDbContextLogistics.Infrastructure.PersistenceUse the helper script:
scripts/add-migration.cmd
Or manually:
For Master DB:
dotnet ef migrations add {MigrationName} --project src/Infrastructure/Logistics.Infrastructure.Persistence --context MasterDbContext -o Migrations/Master
For Tenant DB:
dotnet ef migrations add {MigrationName} --project src/Infrastructure/Logistics.Infrastructure.Persistence --context TenantDbContext -o Migrations/Tenant
Use a short, descriptive PascalCase name that says what the migration does — EF Core auto-prefixes the timestamp, so do not add Version_NNNN, numeric suffixes, or a date.
InitialSchema, AddDriverLicenseExpiry, RenameLoadStatus, AddTenantVatNumber, DropLegacyDispatchTableVersion_0042, Migration_5, Update3, Changes_2026_05_19The first migration for a database is conventionally named InitialSchema (or InitialCreate).