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( name: "ChangedBy", table: "Suppliers", nullable: true); migrationBuilder.AddColumn( name: "ChangedOn", table: "Suppliers", nullable: true); migrationBuilder.AddColumn( name: "CreatedBy", table: "Suppliers", nullable: false); migrationBuilder.AddColumn( name: "CreatedOn", table: "Suppliers", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "ChangedBy", table: "Materials", nullable: true); migrationBuilder.AddColumn( name: "ChangedOn", table: "Materials", nullable: true); migrationBuilder.AddColumn( name: "CreatedBy", table: "Materials", nullable: false); migrationBuilder.AddColumn( name: "CreatedOn", table: "Materials", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "ChangedBy", table: "Employees", nullable: true); migrationBuilder.AddColumn( name: "ChangedOn", table: "Employees", nullable: true); migrationBuilder.AddColumn( name: "CreatedBy", table: "Employees", nullable: false); migrationBuilder.AddColumn( name: "CreatedOn", table: "Employees", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AlterColumn( name: "TaxId", table: "Customers", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AddColumn( name: "ChangedBy", table: "Customers", nullable: true); migrationBuilder.AddColumn( name: "ChangedOn", table: "Customers", nullable: true); migrationBuilder.AddColumn( name: "CreatedBy", table: "Customers", nullable: false); migrationBuilder.AddColumn( name: "CreatedOn", table: "Customers", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "IsBusiness", table: "Customers", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "ChangedBy", table: "Crafts", nullable: true); migrationBuilder.AddColumn( name: "ChangedOn", table: "Crafts", nullable: true); migrationBuilder.AddColumn( name: "CreatedBy", table: "Crafts", nullable: false); migrationBuilder.AddColumn( 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( name: "TaxId", table: "Customers", type: "int", nullable: false, oldClrType: typeof(int), oldNullable: true); } } }