using Microsoft.EntityFrameworkCore.Migrations;

namespace GreenTree.Strohrmann.ERP.Domain.Migrations
{
    public partial class Calculation : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<decimal>(
                name: "CalculationFactor",
                table: "CraftMaterials",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<decimal>(
                name: "Value",
                table: "CraftEmployees",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.InsertData(
                table: "Units",
                columns: new[] { "Id", "Description", "Name", "ShortName" },
                values: new object[] { 8, "Angabe in Einheit Milimeter", "Milimeter", "mm" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Units",
                keyColumn: "Id",
                keyValue: 8);

            migrationBuilder.DropColumn(
                name: "CalculationFactor",
                table: "CraftMaterials");

            migrationBuilder.DropColumn(
                name: "Value",
                table: "CraftEmployees");
        }
    }
}
