Back to Btcpayserver

BTCPayServer Migrations

.agents/skills/btcpayserver-migrations/SKILL.md

2.4.1629 B
Original Source

BTCPayServer Migrations

Creating Migrations

  • Run dotnet ef migrations add <migration-name> to generate the migration.
  • Copy the class attributes from the generated .Designer.cs file to the .cs migration file.
  • Remove the generated .Designer.cs file.
  • 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 the Migrations folder, for example 20260525115757_passkey.cs, and use migrationBuilder.Sql to run raw SQL.
  • Follow postgres naming conventions.