1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-04 14:13:28 +01:00
bitwarden-server/util/PostgresMigrations/Migrations/20240701175214_Net8Sync.cs

126 lines
3.8 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
/// <inheritdoc />
public partial class Net8Sync : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_ProviderInvoiceItem_Id_InvoiceId",
table: "ProviderInvoiceItem");
migrationBuilder.AlterColumn<string>(
name: "PlanName",
table: "ProviderInvoiceItem",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "InvoiceNumber",
table: "ProviderInvoiceItem",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "InvoiceId",
table: "ProviderInvoiceItem",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ClientName",
table: "ProviderInvoiceItem",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Discriminator",
table: "AccessPolicy",
type: "character varying(34)",
maxLength: 34,
nullable: false,
oldClrType: typeof(string),
oldType: "text");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "PlanName",
table: "ProviderInvoiceItem",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "InvoiceNumber",
table: "ProviderInvoiceItem",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "InvoiceId",
table: "ProviderInvoiceItem",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ClientName",
table: "ProviderInvoiceItem",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Discriminator",
table: "AccessPolicy",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(34)",
oldMaxLength: 34);
migrationBuilder.CreateIndex(
name: "IX_ProviderInvoiceItem_Id_InvoiceId",
table: "ProviderInvoiceItem",
columns: new[] { "Id", "InvoiceId" },
unique: true);
}
}