database-manager

Synchronize Entity classes and DbContext files with docker/setup.sql schema changes.

1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Brendon3578/MediaTranscriptKnowledgeRAG --skill database-manager-brendon3578
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-manager
Source: https://github.com/Brendon3578/MediaTranscriptKnowledgeRAG/tree/main/.cursor/skills/database-manager
Command: npx skills add https://github.com/Brendon3578/MediaTranscriptKnowledgeRAG --skill database-manager-brendon3578

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of modifying database schemas and ensuring that application code (Entities and DbContext) stays synchronized with the database structure, preventing inconsistencies.

Core Features & Use Cases

  • Single Source of Truth: Enforces docker/setup.sql as the definitive schema definition.
  • Global Synchronization: Ensures all Entity classes and DbContext files are updated when the schema changes.
  • Entity Mapping: Guides the correct mapping of SQL columns to C# Entity properties using [Column] attributes.
  • DbContext Configuration: Provides a pattern for configuring entity mappings within DbContext files.
  • Use Case: When a new column last_login is added to the users table in docker/setup.sql, this Skill ensures the UserEntity class gets a LastLogin property with [Column("last_login")] and that all relevant DbContext files are updated accordingly.

Quick Start

Modify the docker/setup.sql file to reflect the desired database schema changes.

Frequently Asked Questions about database-manager

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

FAQPage Schema
How do I sync my C# Entity classes with database schema changes?

To sync C# Entity classes with database schema changes, modify the `docker/setup.sql` file to enforce it as the single source of truth. This automatically updates all relevant Entity classes and DbContext files to reflect the new schema structure.

What is the best way to manage SQL column mapping in a DbContext?

The best way to manage SQL column mapping in a DbContext is by using explicit `[Column("name")]` attributes on your Entity properties. This ensures accurate mapping and provides a clear configuration pattern within the DbContext `OnModelCreating` method.

How do I update DbContext files when adding a new SQL column?

To update DbContext files when adding a new SQL column, define the change in `docker/setup.sql`. The synchronization process ensures the matching Entity class gets the new property and all relevant DbContext files are updated to reflect the schema modification.

Do I need a single source of truth for database schema and entity synchronization?

Yes, enforcing `docker/setup.sql` as the single source of truth for database schema and entity synchronization is required. It prevents inconsistencies by ensuring all application code updates are directly driven by the SQL schema definition.

Does this database schema synchronization approach work with Docker setup scripts?

Yes, this database schema synchronization approach works directly with Docker setup scripts by enforcing `docker/setup.sql` as the definitive schema definition. It reads the SQL file to update C# Entity classes and DbContext files accordingly.