1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00
bitwarden-server/util/PostgresMigrations/Migrations/20240701175214_Net8Sync.cs
Matt Bishop e8c5d73062
Sync EF migrations for .NET / EF Core 8 (#4448)
* Sync EF migrations for .NET 8

* Format

* Redo migrations with billing fix

* Forgot to format again
2024-07-02 10:08:34 -04:00

126 lines
3.8 KiB
C#

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);
}
}