db-only-slice

Implement database-only EF Core schema changes with safe migrations.

2|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/NNPopov/movie-theater-tickets --skill db-only-slice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-only-slice
Source: https://github.com/NNPopov/movie-theater-tickets/tree/main/src/services/.claude/skills/db-only-slice
Command: npx skills add https://github.com/NNPopov/movie-theater-tickets --skill db-only-slice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement database-only changes for a clean-architecture backend without accidentally adding handlers, endpoints, or other application logic.

Core Features & Use Cases

  • EF Core entity updates: Change domain entities and keep the model aligned with persistence needs.
  • Fluent configuration updates: Define table mapping, columns, relationships, indexes, and constraints in infrastructure.
  • Migration safety checks: Review generated migrations for destructive drops, missing defaults, and rollback coverage.
  • Use Case: Use this Skill when a feature slice only needs new schema support, such as adding a column, introducing a new entity, or wiring a new relationship.

Quick Start

Use the db-only-slice skill to implement a database-only feature slice for the repository’s EF Core model and migration layer.

Frequently Asked Questions about db-only-slice

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

FAQPage Schema
How do I add a new EF Core column without introducing application endpoints or handlers?

To add an EF Core column without application logic, use a database-only schema slice that updates domain entities, fluent configurations, and DbContext registration. This isolates persistence layer changes so no handlers or endpoints are generated.

What is a database-only schema slice in clean architecture?

A database-only schema slice in clean architecture is a feature slice that exclusively modifies EF Core domain entities, fluent configurations, DbContext registration, and migrations without adding application handlers, endpoints, or business logic.

How do I generate safe EF Core migrations for non-nullable columns?

To generate safe EF Core migrations for non-nullable columns, the database-only schema slice requires setting default values for non-nullable columns and validating indexes, foreign keys, and rollback behavior during migration generation.

Can I use this approach to update EF Core fluent configurations for new table relationships?

Yes, you can use the database-only schema slice to update EF Core fluent configurations. It specifically supports defining table mapping, columns, relationships, indexes, and constraints within the infrastructure layer.

How do I validate EF Core migration rollback behavior for destructive drops?

To validate EF Core migration rollback behavior, the database-only schema slice reviews generated migrations for destructive drops, missing defaults, and rollback coverage. This ensures safe migration generation and validates indexes and foreign keys.