Agent Skills
› btcpayserver/btcpayserver
› btcpayserver-migrations
btcpayserver-migrations
GitHub指导在BTCPayServer项目中创建和审查Entity Framework数据库迁移,包含生成、清理及PostgreSQL特定规范。
Trigger Scenarios
创建数据库迁移
审查迁移文件
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


