using System; using Microsoft.EntityFrameworkCore.Migrations; namespace AuthServer.Host.Migrations { public partial class Added_Tenant_Management : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AbpTenants", columns: table => new { Id = table.Column(nullable: false), ExtraProperties = table.Column(nullable: true), ConcurrencyStamp = table.Column(nullable: true), CreationTime = table.Column(nullable: false), CreatorId = table.Column(nullable: true), LastModificationTime = table.Column(nullable: true), LastModifierId = table.Column(nullable: true), IsDeleted = table.Column(nullable: false, defaultValue: false), DeleterId = table.Column(nullable: true), DeletionTime = table.Column(nullable: true), Name = table.Column(maxLength: 64, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpTenants", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpTenantConnectionStrings", columns: table => new { TenantId = table.Column(nullable: false), Name = table.Column(maxLength: 64, nullable: false), Value = table.Column(maxLength: 1024, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); table.ForeignKey( name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", column: x => x.TenantId, principalTable: "AbpTenants", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", table: "AbpTenants", column: "Name"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AbpTenantConnectionStrings"); migrationBuilder.DropTable( name: "AbpTenants"); } } }