76 lines
2.2 KiB
C#
76 lines
2.2 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|