Added code for Person / Address

This commit is contained in:
2021-03-07 23:39:37 +01:00
parent 00b407f790
commit b4baefd68f
19 changed files with 1094 additions and 26 deletions

View File

@ -0,0 +1,75 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace DatamodelLibrary.Migrations
{
public partial class ChangedFormat_Person_Address : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "PostOrt",
table: "Addresses",
newName: "Street2");
migrationBuilder.RenameColumn(
name: "PostNr",
table: "Addresses",
newName: "Zipcode");
migrationBuilder.RenameColumn(
name: "Gata2",
table: "Addresses",
newName: "Street");
migrationBuilder.RenameColumn(
name: "Gata",
table: "Addresses",
newName: "Destination");
migrationBuilder.AddColumn<long>(
name: "AccountNo",
table: "Persons",
type: "INTEGER",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn<int>(
name: "ClearingNo",
table: "Persons",
type: "INTEGER",
nullable: false,
defaultValue: 0);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AccountNo",
table: "Persons");
migrationBuilder.DropColumn(
name: "ClearingNo",
table: "Persons");
migrationBuilder.RenameColumn(
name: "Zipcode",
table: "Addresses",
newName: "PostNr");
migrationBuilder.RenameColumn(
name: "Street2",
table: "Addresses",
newName: "PostOrt");
migrationBuilder.RenameColumn(
name: "Street",
table: "Addresses",
newName: "Gata2");
migrationBuilder.RenameColumn(
name: "Destination",
table: "Addresses",
newName: "Gata");
}
}
}