Y3S1-Cloud_Systems_DevOps/ThAmCo-Stock/ThAmCo.Stock/Data/Migrations/20200102001637_AddBaseOrderRequests.cs

38 lines
1.4 KiB
C#
Raw Normal View History

2020-06-09 20:21:37 +00:00
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ThAmCo.Stock.Data.Migrations
{
public partial class AddBaseOrderRequests : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OrderRequests",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
ProductId = table.Column<int>(nullable: false),
Quantity = table.Column<int>(nullable: false),
Price = table.Column<double>(nullable: false),
SubmittedTime = table.Column<DateTime>(nullable: false),
Approved = table.Column<bool>(nullable: false),
ApprovedTime = table.Column<DateTime>(nullable: false),
Deleted = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OrderRequests", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OrderRequests");
}
}
}