Added code for Person / Address
This commit is contained in:
151
DatamodelLibrary/Migrations/20210307212939_ChangedFormat_Person_Address.Designer.cs
generated
Normal file
151
DatamodelLibrary/Migrations/20210307212939_ChangedFormat_Person_Address.Designer.cs
generated
Normal file
@ -0,0 +1,151 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using DatamodelLibrary;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace DatamodelLibrary.Migrations
|
||||
{
|
||||
[DbContext(typeof(StockContext))]
|
||||
[Migration("20210307212939_ChangedFormat_Person_Address")]
|
||||
partial class ChangedFormat_Person_Address
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "5.0.3");
|
||||
|
||||
modelBuilder.Entity("DataDomain.Address", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Destination")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nation")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street2")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Zipcode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.Person", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("AccountNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Born")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ClearingNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comments")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("HomeAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("InvoiceAddress")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("NickName")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Persons");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.PersonStock", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("PersonId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("StockId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PersonStocks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("DataDomain.StockMember", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("ActAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("ActDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("ActValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("BuyDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal>("BuyValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("PostAmount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("SoldDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<decimal?>("SoldValue")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockExtId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("StockId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Stocks");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22,21 +22,21 @@ namespace DatamodelLibrary.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Gata")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Gata2")
|
||||
b.Property<string>("Destination")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nation")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("PostNr")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("PostOrt")
|
||||
b.Property<string>("Street")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Street2")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Zipcode")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Addresses");
|
||||
@ -48,9 +48,15 @@ namespace DatamodelLibrary.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime?>("Born")
|
||||
b.Property<long>("AccountNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Born")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("ClearingNo")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Comments")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user