migration

This commit is contained in:
Tizian.Breuch
2025-08-12 11:53:49 +02:00
parent b9f1b3fb7a
commit 860f111cde
3 changed files with 160 additions and 3 deletions

View File

@@ -12,8 +12,8 @@ using Webshop.Infrastructure.Data;
namespace Webshop.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20250806081749_images")]
partial class images
[Migration("20250812095336_discountAndInfo")]
partial class discountAndInfo
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -861,6 +861,71 @@ namespace Webshop.Infrastructure.Migrations
b.ToTable("ShippingMethods");
});
modelBuilder.Entity("Webshop.Domain.Entities.ShopInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("City")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("CompanyRegistrationNumber")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("ContactEmail")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Country")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("FacebookUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("InstagramUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("PhoneNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("PostalCode")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("ShopName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Slogan")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("Street")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("TwitterUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("VatNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.ToTable("ShopInfos");
});
modelBuilder.Entity("Webshop.Domain.Entities.Supplier", b =>
{
b.Property<Guid>("Id")

View File

@@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Webshop.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class images : Migration
public partial class discountAndInfo : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@@ -126,6 +126,30 @@ namespace Webshop.Infrastructure.Migrations
table.PrimaryKey("PK_ShippingMethods", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ShopInfos",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
ShopName = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
Slogan = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
ContactEmail = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
PhoneNumber = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
Street = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
City = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
PostalCode = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: true),
Country = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
VatNumber = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
CompanyRegistrationNumber = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
FacebookUrl = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
InstagramUrl = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
TwitterUrl = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ShopInfos", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
@@ -811,6 +835,9 @@ namespace Webshop.Infrastructure.Migrations
migrationBuilder.DropTable(
name: "Settings");
migrationBuilder.DropTable(
name: "ShopInfos");
migrationBuilder.DropTable(
name: "UserClaims");

View File

@@ -858,6 +858,71 @@ namespace Webshop.Infrastructure.Migrations
b.ToTable("ShippingMethods");
});
modelBuilder.Entity("Webshop.Domain.Entities.ShopInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("City")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("CompanyRegistrationNumber")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("ContactEmail")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Country")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("FacebookUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("InstagramUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("PhoneNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("PostalCode")
.HasMaxLength(20)
.HasColumnType("character varying(20)");
b.Property<string>("ShopName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Slogan")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<string>("Street")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("TwitterUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("VatNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.HasKey("Id");
b.ToTable("ShopInfos");
});
modelBuilder.Entity("Webshop.Domain.Entities.Supplier", b =>
{
b.Property<Guid>("Id")