using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Bit.MySqlMigrations.Migrations; /// public partial class AddClientOrganizationMigrationRecordTable : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ClientOrganizationMigrationRecord", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), OrganizationId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ProviderId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), PlanType = table.Column(type: "tinyint unsigned", nullable: false), Seats = table.Column(type: "int", nullable: false), MaxStorageGb = table.Column(type: "smallint", nullable: true), GatewayCustomerId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), GatewaySubscriptionId = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true), MaxAutoscaleSeats = table.Column(type: "int", nullable: true), Status = table.Column(type: "tinyint unsigned", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ClientOrganizationMigrationRecord", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); 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"); } }