forked from sanchezvem/PyroFetes
Fix Type errors
This commit is contained in:
1966
PyroFetes/Migrations/20251120154429_FixTypeErrors.Designer.cs
generated
Normal file
1966
PyroFetes/Migrations/20251120154429_FixTypeErrors.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
68
PyroFetes/Migrations/20251120154429_FixTypeErrors.cs
Normal file
68
PyroFetes/Migrations/20251120154429_FixTypeErrors.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PyroFetes.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FixTypeErrors : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "nvarchar(5)",
|
||||
maxLength: 5,
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Caliber",
|
||||
table: "Products",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "decimal(18,2)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ZipCode",
|
||||
table: "Suppliers",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(5)",
|
||||
oldMaxLength: 5);
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "Caliber",
|
||||
table: "Products",
|
||||
type: "decimal(18,2)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "ApprovalNumber",
|
||||
table: "Products",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -503,11 +503,12 @@ namespace PyroFetes.Migrations
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ApprovalNumber")
|
||||
.HasColumnType("int");
|
||||
b.Property<string>("ApprovalNumber")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<decimal>("Caliber")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
b.Property<int>("Caliber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ClassificationId")
|
||||
.HasColumnType("int");
|
||||
@@ -1113,8 +1114,10 @@ namespace PyroFetes.Migrations
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
b.Property<string>("ZipCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user