using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace GreenTree.Strohrmann.ERP.Domain.Migrations
{
    public partial class Tracking : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "ChangedBy",
                table: "Suppliers",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ChangedOn",
                table: "Suppliers",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatedBy",
                table: "Suppliers",
                nullable: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedOn",
                table: "Suppliers",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "ChangedBy",
                table: "Materials",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ChangedOn",
                table: "Materials",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatedBy",
                table: "Materials",
                nullable: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedOn",
                table: "Materials",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "ChangedBy",
                table: "Employees",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ChangedOn",
                table: "Employees",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatedBy",
                table: "Employees",
                nullable: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedOn",
                table: "Employees",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AlterColumn<int>(
                name: "TaxId",
                table: "Customers",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AddColumn<string>(
                name: "ChangedBy",
                table: "Customers",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ChangedOn",
                table: "Customers",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatedBy",
                table: "Customers",
                nullable: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedOn",
                table: "Customers",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<bool>(
                name: "IsBusiness",
                table: "Customers",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<string>(
                name: "ChangedBy",
                table: "Crafts",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ChangedOn",
                table: "Crafts",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "CreatedBy",
                table: "Crafts",
                nullable: false);

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedOn",
                table: "Crafts",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ChangedBy",
                table: "Suppliers");

            migrationBuilder.DropColumn(
                name: "ChangedOn",
                table: "Suppliers");

            migrationBuilder.DropColumn(
                name: "CreatedBy",
                table: "Suppliers");

            migrationBuilder.DropColumn(
                name: "CreatedOn",
                table: "Suppliers");

            migrationBuilder.DropColumn(
                name: "ChangedBy",
                table: "Materials");

            migrationBuilder.DropColumn(
                name: "ChangedOn",
                table: "Materials");

            migrationBuilder.DropColumn(
                name: "CreatedBy",
                table: "Materials");

            migrationBuilder.DropColumn(
                name: "CreatedOn",
                table: "Materials");

            migrationBuilder.DropColumn(
                name: "ChangedBy",
                table: "Employees");

            migrationBuilder.DropColumn(
                name: "ChangedOn",
                table: "Employees");

            migrationBuilder.DropColumn(
                name: "CreatedBy",
                table: "Employees");

            migrationBuilder.DropColumn(
                name: "CreatedOn",
                table: "Employees");

            migrationBuilder.DropColumn(
                name: "ChangedBy",
                table: "Customers");

            migrationBuilder.DropColumn(
                name: "ChangedOn",
                table: "Customers");

            migrationBuilder.DropColumn(
                name: "CreatedBy",
                table: "Customers");

            migrationBuilder.DropColumn(
                name: "CreatedOn",
                table: "Customers");

            migrationBuilder.DropColumn(
                name: "IsBusiness",
                table: "Customers");

            migrationBuilder.DropColumn(
                name: "ChangedBy",
                table: "Crafts");

            migrationBuilder.DropColumn(
                name: "ChangedOn",
                table: "Crafts");

            migrationBuilder.DropColumn(
                name: "CreatedBy",
                table: "Crafts");

            migrationBuilder.DropColumn(
                name: "CreatedOn",
                table: "Crafts");

            migrationBuilder.AlterColumn<int>(
                name: "TaxId",
                table: "Customers",
                type: "int",
                nullable: false,
                oldClrType: typeof(int),
                oldNullable: true);
        }
    }
}
