mirror of
https://github.com/bitwarden/server.git
synced 2024-11-23 12:25:16 +01:00
bb3a9daf98
* 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
37 lines
919 B
C#
37 lines
919 B
C#
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);
|
|
}
|
|
}
|