using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
///
public partial class AddClientOrganizationMigrationRecordTable : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ClientOrganizationMigrationRecord",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
OrganizationId = table.Column(type: "uuid", nullable: false),
ProviderId = table.Column(type: "uuid", nullable: false),
PlanType = table.Column(type: "smallint", nullable: false),
Seats = table.Column(type: "integer", nullable: false),
MaxStorageGb = table.Column(type: "smallint", nullable: true),
GatewayCustomerId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false),
GatewaySubscriptionId = table.Column(type: "character varying(50)", maxLength: 50, nullable: false),
ExpirationDate = table.Column(type: "timestamp with time zone", nullable: true),
MaxAutoscaleSeats = table.Column(type: "integer", nullable: true),
Status = table.Column(type: "smallint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientOrganizationMigrationRecord", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_ClientOrganizationMigrationRecord_ProviderId_OrganizationId",
table: "ClientOrganizationMigrationRecord",
columns: new[] { "ProviderId", "OrganizationId" },
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ClientOrganizationMigrationRecord");
}
}