fixed errors in database

This commit is contained in:
2025-11-26 20:37:49 +01:00
parent 5d68ee6992
commit 3e8f36457e
3 changed files with 2005 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PyroFetes.Migrations
{
/// <inheritdoc />
public partial class UpdatedDatabaseProductType : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ApprovalNumber",
table: "Products",
type: "nvarchar(100)",
maxLength: 100,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ApprovalNumber",
table: "Products",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(100)",
oldMaxLength: 100);
}
}
}

View File

@@ -505,7 +505,8 @@ namespace PyroFetes.Migrations
b.Property<string>("ApprovalNumber") b.Property<string>("ApprovalNumber")
.IsRequired() .IsRequired()
.HasColumnType("nvarchar(max)"); .HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<int>("Caliber") b.Property<int>("Caliber")
.HasColumnType("int"); .HasColumnType("int");