using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Faben.Api.Migrations { /// public partial class UserTable23 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "PriceOfferRequests", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), CreationTime = table.Column(type: "datetimeoffset", nullable: false), ProductId = table.Column(type: "uniqueidentifier", nullable: false), UserId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_PriceOfferRequests", x => x.Id); table.ForeignKey( name: "FK_PriceOfferRequests_AspNetUsers_UserId", column: x => x.UserId, principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_PriceOfferRequests_Products_ProductId", column: x => x.ProductId, principalTable: "Products", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_PriceOfferRequests_ProductId", table: "PriceOfferRequests", column: "ProductId"); migrationBuilder.CreateIndex( name: "IX_PriceOfferRequests_UserId", table: "PriceOfferRequests", column: "UserId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "PriceOfferRequests"); } } }