diff --git a/util/MySqlMigrations/Migrations/20250326124705_CreateOpaqueKeyExchangeCredential.cs b/util/MySqlMigrations/Migrations/20250326124705_CreateOpaqueKeyExchangeCredential.cs
index 7a5b3d4663..d72acbc8db 100644
--- a/util/MySqlMigrations/Migrations/20250326124705_CreateOpaqueKeyExchangeCredential.cs
+++ b/util/MySqlMigrations/Migrations/20250326124705_CreateOpaqueKeyExchangeCredential.cs
@@ -1,57 +1,55 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
-namespace Bit.MySqlMigrations.Migrations
+namespace Bit.MySqlMigrations.Migrations;
+
+///
+public partial class CreateOpaqueKeyExchangeCredential : Migration
{
///
- public partial class CreateOpaqueKeyExchangeCredential : Migration
+ protected override void Up(MigrationBuilder migrationBuilder)
{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "OpaqueKeyExchangeCredential",
- columns: table => new
- {
- Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- CipherConfiguration = table.Column(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CredentialBlob = table.Column(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- EncryptedPublicKey = table.Column(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- EncryptedPrivateKey = table.Column(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- EncryptedUserKey = table.Column(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CreationDate = table.Column(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
- table.ForeignKey(
- name: "FK_OpaqueKeyExchangeCredential_User_UserId",
- column: x => x.UserId,
- principalTable: "User",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
+ migrationBuilder.CreateTable(
+ name: "OpaqueKeyExchangeCredential",
+ columns: table => new
+ {
+ Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
+ CipherConfiguration = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CredentialBlob = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ EncryptedPublicKey = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ EncryptedPrivateKey = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ EncryptedUserKey = table.Column(type: "longtext", nullable: true)
+ .Annotation("MySql:CharSet", "utf8mb4"),
+ CreationDate = table.Column(type: "datetime(6)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
+ table.ForeignKey(
+ name: "FK_OpaqueKeyExchangeCredential_User_UserId",
+ column: x => x.UserId,
+ principalTable: "User",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ })
+ .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateIndex(
- name: "IX_OpaqueKeyExchangeCredential_UserId",
- table: "OpaqueKeyExchangeCredential",
- column: "UserId");
- }
+ migrationBuilder.CreateIndex(
+ name: "IX_OpaqueKeyExchangeCredential_UserId",
+ table: "OpaqueKeyExchangeCredential",
+ column: "UserId");
+ }
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "OpaqueKeyExchangeCredential");
- }
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "OpaqueKeyExchangeCredential");
}
}
diff --git a/util/PostgresMigrations/Migrations/20250326124645_CreateOpaqueKeyExchangeCredential.cs b/util/PostgresMigrations/Migrations/20250326124645_CreateOpaqueKeyExchangeCredential.cs
index 22204d159e..a1ac338e03 100644
--- a/util/PostgresMigrations/Migrations/20250326124645_CreateOpaqueKeyExchangeCredential.cs
+++ b/util/PostgresMigrations/Migrations/20250326124645_CreateOpaqueKeyExchangeCredential.cs
@@ -1,51 +1,49 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
-namespace Bit.PostgresMigrations.Migrations
+namespace Bit.PostgresMigrations.Migrations;
+
+///
+public partial class CreateOpaqueKeyExchangeCredential : Migration
{
///
- public partial class CreateOpaqueKeyExchangeCredential : Migration
+ protected override void Up(MigrationBuilder migrationBuilder)
{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "OpaqueKeyExchangeCredential",
- columns: table => new
- {
- Id = table.Column(type: "uuid", nullable: false),
- UserId = table.Column(type: "uuid", nullable: false),
- CipherConfiguration = table.Column(type: "text", nullable: true),
- CredentialBlob = table.Column(type: "text", nullable: true),
- EncryptedPublicKey = table.Column(type: "text", nullable: true),
- EncryptedPrivateKey = table.Column(type: "text", nullable: true),
- EncryptedUserKey = table.Column(type: "text", nullable: true),
- CreationDate = table.Column(type: "timestamp with time zone", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
- table.ForeignKey(
- name: "FK_OpaqueKeyExchangeCredential_User_UserId",
- column: x => x.UserId,
- principalTable: "User",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
+ migrationBuilder.CreateTable(
+ name: "OpaqueKeyExchangeCredential",
+ columns: table => new
+ {
+ Id = table.Column(type: "uuid", nullable: false),
+ UserId = table.Column(type: "uuid", nullable: false),
+ CipherConfiguration = table.Column(type: "text", nullable: true),
+ CredentialBlob = table.Column(type: "text", nullable: true),
+ EncryptedPublicKey = table.Column(type: "text", nullable: true),
+ EncryptedPrivateKey = table.Column(type: "text", nullable: true),
+ EncryptedUserKey = table.Column(type: "text", nullable: true),
+ CreationDate = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
+ table.ForeignKey(
+ name: "FK_OpaqueKeyExchangeCredential_User_UserId",
+ column: x => x.UserId,
+ principalTable: "User",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
- migrationBuilder.CreateIndex(
- name: "IX_OpaqueKeyExchangeCredential_UserId",
- table: "OpaqueKeyExchangeCredential",
- column: "UserId");
- }
+ migrationBuilder.CreateIndex(
+ name: "IX_OpaqueKeyExchangeCredential_UserId",
+ table: "OpaqueKeyExchangeCredential",
+ column: "UserId");
+ }
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "OpaqueKeyExchangeCredential");
- }
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "OpaqueKeyExchangeCredential");
}
}
diff --git a/util/SqliteMigrations/Migrations/20250326124656_CreateOpaqueKeyExchangeCredential.cs b/util/SqliteMigrations/Migrations/20250326124656_CreateOpaqueKeyExchangeCredential.cs
index 26fe28f40e..62949ee70a 100644
--- a/util/SqliteMigrations/Migrations/20250326124656_CreateOpaqueKeyExchangeCredential.cs
+++ b/util/SqliteMigrations/Migrations/20250326124656_CreateOpaqueKeyExchangeCredential.cs
@@ -1,51 +1,49 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
-namespace Bit.SqliteMigrations.Migrations
+namespace Bit.SqliteMigrations.Migrations;
+
+///
+public partial class CreateOpaqueKeyExchangeCredential : Migration
{
///
- public partial class CreateOpaqueKeyExchangeCredential : Migration
+ protected override void Up(MigrationBuilder migrationBuilder)
{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "OpaqueKeyExchangeCredential",
- columns: table => new
- {
- Id = table.Column(type: "TEXT", nullable: false),
- UserId = table.Column(type: "TEXT", nullable: false),
- CipherConfiguration = table.Column(type: "TEXT", nullable: true),
- CredentialBlob = table.Column(type: "TEXT", nullable: true),
- EncryptedPublicKey = table.Column(type: "TEXT", nullable: true),
- EncryptedPrivateKey = table.Column(type: "TEXT", nullable: true),
- EncryptedUserKey = table.Column(type: "TEXT", nullable: true),
- CreationDate = table.Column(type: "TEXT", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
- table.ForeignKey(
- name: "FK_OpaqueKeyExchangeCredential_User_UserId",
- column: x => x.UserId,
- principalTable: "User",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
+ migrationBuilder.CreateTable(
+ name: "OpaqueKeyExchangeCredential",
+ columns: table => new
+ {
+ Id = table.Column(type: "TEXT", nullable: false),
+ UserId = table.Column(type: "TEXT", nullable: false),
+ CipherConfiguration = table.Column(type: "TEXT", nullable: true),
+ CredentialBlob = table.Column(type: "TEXT", nullable: true),
+ EncryptedPublicKey = table.Column(type: "TEXT", nullable: true),
+ EncryptedPrivateKey = table.Column(type: "TEXT", nullable: true),
+ EncryptedUserKey = table.Column(type: "TEXT", nullable: true),
+ CreationDate = table.Column(type: "TEXT", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
+ table.ForeignKey(
+ name: "FK_OpaqueKeyExchangeCredential_User_UserId",
+ column: x => x.UserId,
+ principalTable: "User",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
- migrationBuilder.CreateIndex(
- name: "IX_OpaqueKeyExchangeCredential_UserId",
- table: "OpaqueKeyExchangeCredential",
- column: "UserId");
- }
+ migrationBuilder.CreateIndex(
+ name: "IX_OpaqueKeyExchangeCredential_UserId",
+ table: "OpaqueKeyExchangeCredential",
+ column: "UserId");
+ }
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "OpaqueKeyExchangeCredential");
- }
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "OpaqueKeyExchangeCredential");
}
}