migration

This commit is contained in:
Tizian.Breuch
2025-08-01 09:31:25 +02:00
parent 14daa831cb
commit f4c56c7648
3 changed files with 18 additions and 20 deletions

View File

@@ -12,8 +12,8 @@ using Webshop.Infrastructure.Data;
namespace Webshop.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20250731144311_addOrder")]
partial class addOrder
[Migration("20250801073120_AddHouseNumberAndTypeToAddress")]
partial class AddHouseNumberAndTypeToAddress
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -163,10 +163,6 @@ namespace Webshop.Infrastructure.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AddressType")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("City")
.IsRequired()
.HasMaxLength(100)
@@ -189,6 +185,10 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("HouseNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
@@ -208,9 +208,8 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Street2")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");

View File

@@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Webshop.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class addOrder : Migration
public partial class AddHouseNumberAndTypeToAddress : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
@@ -311,13 +311,13 @@ namespace Webshop.Infrastructure.Migrations
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
CustomerId = table.Column<Guid>(type: "uuid", nullable: true),
AddressType = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
Street = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
Street2 = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
HouseNumber = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
City = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
State = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
PostalCode = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
Country = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Type = table.Column<int>(type: "integer", nullable: false),
State = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
CompanyName = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true),
FirstName = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
LastName = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false)

View File

@@ -160,10 +160,6 @@ namespace Webshop.Infrastructure.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AddressType")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("City")
.IsRequired()
.HasMaxLength(100)
@@ -186,6 +182,10 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<string>("HouseNumber")
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(100)
@@ -205,9 +205,8 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Street2")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");