Projektdateien hinzufügen.
This commit is contained in:
1 parent
c0cb99b0e9
commit
45b33fcc3a
71 files changed
+17840
No files matched your search
@@ -0,0 +1,43 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using CocktailWeb.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbDataContext))]
|
||||
[Migration("20231230195107_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Flasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("Pos")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Flaschen");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Flaschen",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Pos = table.Column<int>(type: "INTEGER", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Flaschen", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Flaschen");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using CocktailWeb.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbDataContext))]
|
||||
[Migration("20240107163258_SeedData")]
|
||||
partial class SeedData
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Flasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("Pos")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Flaschen", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Jägermeister"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Wodka"
|
||||
});
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SeedData : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.InsertData(
|
||||
table: "Flaschen",
|
||||
columns: new[] { "Id", "Name", "Pos" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, "Jägermeister", null },
|
||||
{ 2, "Wodka", null }
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DeleteData(
|
||||
table: "Flaschen",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1);
|
||||
|
||||
migrationBuilder.DeleteData(
|
||||
table: "Flaschen",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using CocktailWeb.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbDataContext))]
|
||||
[Migration("20240108173741_CreateCocktailTable")]
|
||||
partial class CreateCocktailTable
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cocktails");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CocktailID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("FlascheID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Menge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Reihenfolge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CocktailID");
|
||||
|
||||
b.HasIndex("FlascheID");
|
||||
|
||||
b.ToTable("CocktailFlaschen");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Flasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("Pos")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Flaschen", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Jägermeister"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Wodka"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.HasOne("CocktailWeb.Data.Cocktail", "Cocktail")
|
||||
.WithMany("Cocktailflaschen")
|
||||
.HasForeignKey("CocktailID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CocktailWeb.Data.Flasche", "Flasche")
|
||||
.WithMany()
|
||||
.HasForeignKey("FlascheID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cocktail");
|
||||
|
||||
b.Navigation("Flasche");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Navigation("Cocktailflaschen");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CreateCocktailTable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Cocktails",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Cocktails", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CocktailFlaschen",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
CocktailID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
FlascheID = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Reihenfolge = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Menge = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CocktailFlaschen", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CocktailFlaschen_Cocktails_CocktailID",
|
||||
column: x => x.CocktailID,
|
||||
principalTable: "Cocktails",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CocktailFlaschen_Flaschen_FlascheID",
|
||||
column: x => x.FlascheID,
|
||||
principalTable: "Flaschen",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CocktailFlaschen_CocktailID",
|
||||
table: "CocktailFlaschen",
|
||||
column: "CocktailID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CocktailFlaschen_FlascheID",
|
||||
table: "CocktailFlaschen",
|
||||
column: "FlascheID");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CocktailFlaschen");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Cocktails");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using CocktailWeb.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbDataContext))]
|
||||
[Migration("20240109191144_AddImageURLToCocktails")]
|
||||
partial class AddImageURLToCocktails
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ImageURL")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cocktails");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CocktailID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("FlascheID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Menge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Reihenfolge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CocktailID");
|
||||
|
||||
b.HasIndex("FlascheID");
|
||||
|
||||
b.ToTable("CocktailFlaschen");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Flasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("Pos")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Flaschen", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Jägermeister"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Wodka"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.HasOne("CocktailWeb.Data.Cocktail", "Cocktail")
|
||||
.WithMany("Cocktailflaschen")
|
||||
.HasForeignKey("CocktailID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CocktailWeb.Data.Flasche", "Flasche")
|
||||
.WithMany()
|
||||
.HasForeignKey("FlascheID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cocktail");
|
||||
|
||||
b.Navigation("Flasche");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Navigation("Cocktailflaschen");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddImageURLToCocktails : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ImageURL",
|
||||
table: "Cocktails",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ImageURL",
|
||||
table: "Cocktails");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using CocktailWeb.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CocktailWeb.Migrations
|
||||
{
|
||||
[DbContext(typeof(DbDataContext))]
|
||||
partial class FlascheDataContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "7.0.14");
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("ImageURL")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Cocktails");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("CocktailID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("FlascheID")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Menge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Reihenfolge")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CocktailID");
|
||||
|
||||
b.HasIndex("FlascheID");
|
||||
|
||||
b.ToTable("CocktailFlaschen");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Flasche", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("Pos")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Flaschen", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = 1,
|
||||
Name = "Jägermeister"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Name = "Wodka"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.CocktailFlasche", b =>
|
||||
{
|
||||
b.HasOne("CocktailWeb.Data.Cocktail", "Cocktail")
|
||||
.WithMany("Cocktailflaschen")
|
||||
.HasForeignKey("CocktailID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CocktailWeb.Data.Flasche", "Flasche")
|
||||
.WithMany()
|
||||
.HasForeignKey("FlascheID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Cocktail");
|
||||
|
||||
b.Navigation("Flasche");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CocktailWeb.Data.Cocktail", b =>
|
||||
{
|
||||
b.Navigation("Cocktailflaschen");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user