1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[PM-5294][deps]: Update Duende.IdentityServer to v6.3.7 (#3499)

* [deps]: Update Duende.IdentityServer to v6.3.6

* Fix test

* Grant table changes

* Reassert view

* EF migrations

* Restore non-null key and simpler index

* Master SQL sync

* Lint

* Fix ID setting since the property isn't exposed

* Bump to .7

* Point to new Duende package

* Drop unused indexes first

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
renovate[bot]
2023-12-28 15:04:45 -05:00
committed by GitHub
parent de30749628
commit bfa9269b42
18 changed files with 7565 additions and 48 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
/// <inheritdoc />
public partial class GrantIdWithIndexes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Grant",
table: "Grant");
migrationBuilder.AlterColumn<string>(
name: "Type",
table: "Grant",
type: "character varying(50)",
maxLength: 50,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Data",
table: "Grant",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ClientId",
table: "Grant",
type: "character varying(200)",
maxLength: 200,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(200)",
oldMaxLength: 200,
oldNullable: true);
migrationBuilder.AddColumn<int>(
name: "Id",
table: "Grant",
type: "integer",
nullable: false,
defaultValue: 0)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
migrationBuilder.AddPrimaryKey(
name: "PK_Grant",
table: "Grant",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_Grant_Key",
table: "Grant",
column: "Key",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_Grant",
table: "Grant");
migrationBuilder.DropIndex(
name: "IX_Grant_Key",
table: "Grant");
migrationBuilder.DropColumn(
name: "Id",
table: "Grant");
migrationBuilder.AlterColumn<string>(
name: "Type",
table: "Grant",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "Data",
table: "Grant",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ClientId",
table: "Grant",
type: "character varying(200)",
maxLength: 200,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(200)",
oldMaxLength: 200);
migrationBuilder.AddPrimaryKey(
name: "PK_Grant",
table: "Grant",
column: "Key");
}
}

View File

@ -480,11 +480,14 @@ namespace Bit.PostgresMigrations.Migrations
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.Grant", b =>
{
b.Property<string>("Key")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
@ -495,6 +498,7 @@ namespace Bit.PostgresMigrations.Migrations
.HasColumnType("timestamp with time zone");
b.Property<string>("Data")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Description")
@ -504,6 +508,11 @@ namespace Bit.PostgresMigrations.Migrations
b.Property<DateTime?>("ExpirationDate")
.HasColumnType("timestamp with time zone");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<string>("SessionId")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
@ -513,10 +522,15 @@ namespace Bit.PostgresMigrations.Migrations
.HasColumnType("character varying(200)");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Key");
b.HasKey("Id")
.HasAnnotation("SqlServer:Clustered", true);
b.HasIndex("Key")
.IsUnique();
b.ToTable("Grant", (string)null);
});