using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Fengling.Platform.Infrastructure.Migrations { /// public partial class Initial : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Platform_Tenants", columns: table => new { Id = table.Column(type: "bigint", nullable: false), TenantCode = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), Name = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), ContactName = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), ContactEmail = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), ContactPhone = table.Column(type: "character varying(20)", maxLength: 20, nullable: true), MaxUsers = table.Column(type: "integer", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: true), ExpiresAt = table.Column(type: "timestamp with time zone", nullable: true), Description = table.Column(type: "character varying(500)", maxLength: 500, nullable: true), Status = table.Column(type: "integer", nullable: false), Deleted = table.Column(type: "boolean", nullable: false), RowVersion = table.Column(type: "integer", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Platform_Tenants", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_Platform_Tenants_Status", table: "Platform_Tenants", column: "Status"); migrationBuilder.CreateIndex( name: "IX_Platform_Tenants_TenantCode", table: "Platform_Tenants", column: "TenantCode", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Platform_Tenants"); } } }