Skip to content

Commit f73d8d5

Browse files
Copilotkbeaugrand
andcommitted
Enable pgcrypto extension for gen_random_uuid() in AddDefaultAdminRole migration
Co-authored-by: kbeaugrand <9513635+kbeaugrand@users.noreply.github.com>
1 parent d991cb6 commit f73d8d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/IoTHub.Portal.Postgres/Migrations/20260107100522_AddDefaultAdminRole.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ public partial class AddDefaultAdminRole : Migration
1313
/// <inheritdoc />
1414
protected override void Up(MigrationBuilder migrationBuilder)
1515
{
16+
// Enable pgcrypto extension for gen_random_uuid() function
17+
_ = migrationBuilder.Sql("CREATE EXTENSION IF NOT EXISTS pgcrypto;");
18+
1619
// Add role with all permissions
1720
_ = migrationBuilder.Sql(
1821
@"

0 commit comments

Comments
 (0)