44 lines
1.8 KiB
C#
44 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace RhSolutions.Api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Init : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Products",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "integer", nullable: false)
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
ProductSku = table.Column<string>(type: "text", nullable: true),
|
|
DeprecatedSkus = table.Column<List<string>>(type: "text[]", nullable: false),
|
|
Name = table.Column<string>(type: "text", nullable: false),
|
|
ProductLine = table.Column<string>(type: "text", nullable: true),
|
|
IsOnWarehouse = table.Column<bool>(type: "boolean", nullable: true),
|
|
ProductMeasure = table.Column<int>(type: "integer", nullable: false),
|
|
DeliveryMakeUp = table.Column<double>(type: "double precision", nullable: true),
|
|
Price = table.Column<decimal>(type: "numeric(8,2)", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Products", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Products");
|
|
}
|
|
}
|
|
}
|