Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jounik53 committed Apr 23, 2024
1 parent 5730128 commit a2b4c0e
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 33 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand All @@ -13,11 +13,14 @@ protected override void Up(MigrationBuilder migrationBuilder)
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "QuoteItem",
type: "nvarchar(1024)",
type: "varchar(1024)",
maxLength: 1024,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldNullable: false);
oldType: "varchar(256)",
oldMaxLength: 256)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}

/// <inheritdoc />
Expand All @@ -26,11 +29,14 @@ protected override void Down(MigrationBuilder migrationBuilder)
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "QuoteItem",
type: "nvarchar(256)",
type: "varchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(1024)",
oldNullable: false);
oldType: "varchar(1024)",
oldMaxLength: 1024)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("varchar(256)");
.HasMaxLength(1024)
.HasColumnType("varchar(1024)");
b.Property<string>("ProductId")
.IsRequired()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand All @@ -13,11 +13,12 @@ protected override void Up(MigrationBuilder migrationBuilder)
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "QuoteItem",
type: "nvarchar(1024)",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldNullable: false);
oldType: "character varying(256)",
oldMaxLength: 256);
}

/// <inheritdoc />
Expand All @@ -26,11 +27,12 @@ protected override void Down(MigrationBuilder migrationBuilder)
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "QuoteItem",
type: "nvarchar(256)",
type: "character varying(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(1024)",
oldNullable: false);
oldType: "character varying(1024)",
oldMaxLength: 1024);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("ProductId")
.IsRequired()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

Expand All @@ -14,10 +14,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "Name",
table: "QuoteItem",
type: "nvarchar(1024)",
maxLength: 1024,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldNullable: false);
oldMaxLength: 256);
}

/// <inheritdoc />
Expand All @@ -27,10 +28,11 @@ protected override void Down(MigrationBuilder migrationBuilder)
name: "Name",
table: "QuoteItem",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(1024)",
oldNullable: false);
oldMaxLength: 1024);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<string>("ProductId")
.IsRequired()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public QuoteItemEntity()
[StringLength(64)]
public string CategoryId { get; set; }
[Required]
[StringLength(256)]
[StringLength(1024)]
public string Name { get; set; }

[StringLength(2048)]
Expand Down

0 comments on commit a2b4c0e

Please sign in to comment.