Daten können hinzugefügt
This commit is contained in:
87
KanSan.Base/Migrations/20200220200339_InitialCommit.Designer.cs
generated
Normal file
87
KanSan.Base/Migrations/20200220200339_InitialCommit.Designer.cs
generated
Normal file
@@ -0,0 +1,87 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using KanSan.Base;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace KanSan.Base.Migrations
|
||||
{
|
||||
[DbContext(typeof(KanSanContext))]
|
||||
[Migration("20200220200339_InitialCommit")]
|
||||
partial class InitialCommit
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("GuidNr")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("KundeID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Ort")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Projektnummer")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Strasse")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("KundeID");
|
||||
|
||||
b.ToTable("Baustellen");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("GuidNr")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nachname")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Ort")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("PLZ")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Strasse")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Vorname")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.ToTable("Kunden");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
||||
{
|
||||
b.HasOne("KanSan.Base.Models.Kunde", "Kunde")
|
||||
.WithMany("Baustellen")
|
||||
.HasForeignKey("KundeID");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
66
KanSan.Base/Migrations/20200220200339_InitialCommit.cs
Normal file
66
KanSan.Base/Migrations/20200220200339_InitialCommit.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace KanSan.Base.Migrations
|
||||
{
|
||||
public partial class InitialCommit : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Kunden",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuidNr = table.Column<Guid>(nullable: false),
|
||||
Vorname = table.Column<string>(nullable: true),
|
||||
Nachname = table.Column<string>(nullable: true),
|
||||
Strasse = table.Column<string>(nullable: true),
|
||||
PLZ = table.Column<string>(nullable: true),
|
||||
Ort = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Kunden", x => x.ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Baustellen",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
GuidNr = table.Column<Guid>(nullable: false),
|
||||
KundeID = table.Column<int>(nullable: true),
|
||||
Ort = table.Column<string>(nullable: true),
|
||||
Strasse = table.Column<string>(nullable: true),
|
||||
Projektnummer = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Baustellen", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_Baustellen_Kunden_KundeID",
|
||||
column: x => x.KundeID,
|
||||
principalTable: "Kunden",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Baustellen_KundeID",
|
||||
table: "Baustellen",
|
||||
column: "KundeID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Baustellen");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Kunden");
|
||||
}
|
||||
}
|
||||
}
|
||||
85
KanSan.Base/Migrations/KanSanContextModelSnapshot.cs
Normal file
85
KanSan.Base/Migrations/KanSanContextModelSnapshot.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using KanSan.Base;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace KanSan.Base.Migrations
|
||||
{
|
||||
[DbContext(typeof(KanSanContext))]
|
||||
partial class KanSanContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.1");
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("GuidNr")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("KundeID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Ort")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Projektnummer")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Strasse")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("KundeID");
|
||||
|
||||
b.ToTable("Baustellen");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("GuidNr")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Nachname")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Ort")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("PLZ")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Strasse")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Vorname")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.ToTable("Kunden");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
||||
{
|
||||
b.HasOne("KanSan.Base.Models.Kunde", "Kunde")
|
||||
.WithMany("Baustellen")
|
||||
.HasForeignKey("KundeID");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user