using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ConfectioneryDatabaseImplement.Migrations { /// public partial class InitialMail : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "MessageInfos", columns: table => new { MessageId = table.Column(type: "nvarchar(450)", nullable: false), ClientId = table.Column(type: "int", nullable: true), SenderName = table.Column(type: "nvarchar(max)", nullable: false), DateDelivery = table.Column(type: "datetime2", nullable: false), Subject = table.Column(type: "nvarchar(max)", nullable: false), Body = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_MessageInfos", x => x.MessageId); table.ForeignKey( name: "FK_MessageInfos_Clients_ClientId", column: x => x.ClientId, principalTable: "Clients", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_MessageInfos_ClientId", table: "MessageInfos", column: "ClientId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "MessageInfos"); } } }