mirror of
https://github.com/bitwarden/server.git
synced 2025-06-03 01:30:35 -05:00

* [PM-19282] Update SsoUser ExternalId column size to 300 * [PM-19282] Add migration to update SsoUser ExternalId column size to 300 for MySQL, PostgreSQL, and SQLite * [PM-19282] Update SsoUser ExternalId column size conditionally based on existing schema * Bumped date on migration script name
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Bit.PostgresMigrations.Migrations;
|
|
|
|
/// <inheritdoc />
|
|
public partial class SsoExternalId : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ExternalId",
|
|
table: "SsoUser",
|
|
type: "character varying(300)",
|
|
maxLength: 300,
|
|
nullable: true,
|
|
collation: "postgresIndetermanisticCollation",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(50)",
|
|
oldMaxLength: 50,
|
|
oldNullable: true,
|
|
oldCollation: "postgresIndetermanisticCollation");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "ExternalId",
|
|
table: "SsoUser",
|
|
type: "character varying(50)",
|
|
maxLength: 50,
|
|
nullable: true,
|
|
collation: "postgresIndetermanisticCollation",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(300)",
|
|
oldMaxLength: 300,
|
|
oldNullable: true,
|
|
oldCollation: "postgresIndetermanisticCollation");
|
|
}
|
|
}
|