Agent Skills
› btcpayserver/btcpayserver
› btcpayserver-migrations
btcpayserver-migrations
GitHub指导在BTCPayServer项目中创建和审查Entity Framework数据库迁移。涵盖生成步骤、清理Designer文件、移除Down方法、强制使用PostgreSQL及命名规范,支持手动添加Raw SQL迁移。
Trigger Scenarios
创建EF数据库迁移
审查迁移文件
处理无法自动生成的迁移
Install
npx skills add btcpayserver/btcpayserver --skill btcpayserver-migrations -g -y
SKILL.md
Frontmatter
{
"name": "btcpayserver-migrations",
"description": "Use when creating or reviewing Entity Framework migrations in BTCPayServer. Contains repository-specific migration generation and cleanup rules."
}
BTCPayServer Migrations
Creating Migrations
- Run
dotnet ef migrations add <migration-name>to generate the migration. - Copy the class attributes from the generated
.Designer.csfile to the.csmigration file. - Remove the generated
.Designer.csfile. - Remove the
Down()method. - Do not use
migrationBuilder.IsNpgsql(); assume PostgreSQL is used. - If a migration cannot be generated through
dotnet ef migrations, add a migration file prefixed by date in theMigrationsfolder, for example20260525115757_passkey.cs, and usemigrationBuilder.Sqlto run raw SQL. - Follow postgres naming conventions.
Version History
- fbf761f Current 2026-08-20 12:02


