mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[SM-678] ClientSecret migration (#2943)
* Init ClientSecret migration * Fix unit tests * Move to src/Sql/dbo_future * Formatting changes * Update migration date for next release * Swap to just executing sp_refreshview * Fix formatting * Add EF Migrations * Rename to ClientSecretHash * Fix unit test * EF column rename * Batch the migration * Fix formatting * Add deprecation notice to property * Move data migration * Swap to CREATE OR ALTER
This commit is contained in:
2188
util/SqliteMigrations/Migrations/20230523223522_ClientSecretHash.Designer.cs
generated
Normal file
2188
util/SqliteMigrations/Migrations/20230523223522_ClientSecretHash.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.SqliteMigrations.Migrations;
|
||||
|
||||
public partial class ClientSecretHash : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ClientSecret",
|
||||
table: "ApiKey");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ClientSecretHash",
|
||||
table: "ApiKey",
|
||||
type: "TEXT",
|
||||
maxLength: 128,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ClientSecretHash",
|
||||
table: "ApiKey");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ClientSecret",
|
||||
table: "ApiKey",
|
||||
type: "TEXT",
|
||||
maxLength: 30,
|
||||
nullable: true);
|
||||
}
|
||||
}
|
@ -1333,8 +1333,8 @@ namespace Bit.SqliteMigrations.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ClientSecret")
|
||||
.HasMaxLength(30)
|
||||
b.Property<string>("ClientSecretHash")
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
|
Reference in New Issue
Block a user