Skip to content

Commit cabf7c7

Browse files
committed
update Level datatype from byte to int after logging changes in e58ebab
Better late than never
1 parent cab922c commit cabf7c7

File tree

4 files changed

+259
-5
lines changed

4 files changed

+259
-5
lines changed

Intersect.Server.Core/Migrations/Sqlite/Logging/SqliteLoggingContextModelSnapshot.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ partial class SqliteLoggingContextModelSnapshot : ModelSnapshot
1515
protected override void BuildModel(ModelBuilder modelBuilder)
1616
{
1717
#pragma warning disable 612, 618
18-
modelBuilder.HasAnnotation("ProductVersion", "7.0.11");
18+
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
1919

2020
modelBuilder.Entity("Intersect.Server.Database.Logging.Entities.ChatHistory", b =>
2121
{
@@ -155,7 +155,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
155155
.HasColumnType("TEXT")
156156
.HasColumnOrder(0);
157157

158-
b.Property<byte>("Level")
158+
b.Property<int>("Level")
159159
.HasColumnType("INTEGER");
160160

161161
b.Property<string>("Method")

Intersect.Server/Migrations/MySql/Logging/20250226184128_UpdateRequestLogLevelType.Designer.cs

Lines changed: 217 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Microsoft.EntityFrameworkCore.Migrations;
2+
3+
#nullable disable
4+
5+
namespace Intersect.Server.Migrations.MySql.Logging
6+
{
7+
/// <inheritdoc />
8+
public partial class UpdateRequestLogLevelType : Migration
9+
{
10+
/// <inheritdoc />
11+
protected override void Up(MigrationBuilder migrationBuilder)
12+
{
13+
migrationBuilder.AlterColumn<int>(
14+
name: "Level",
15+
table: "RequestLogs",
16+
type: "int",
17+
nullable: false,
18+
oldClrType: typeof(byte),
19+
oldType: "tinyint unsigned");
20+
}
21+
22+
/// <inheritdoc />
23+
protected override void Down(MigrationBuilder migrationBuilder)
24+
{
25+
migrationBuilder.AlterColumn<byte>(
26+
name: "Level",
27+
table: "RequestLogs",
28+
type: "tinyint unsigned",
29+
nullable: false,
30+
oldClrType: typeof(int),
31+
oldType: "int");
32+
}
33+
}
34+
}

Intersect.Server/Migrations/MySql/Logging/MySqlLoggingContextModelSnapshot.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Intersect.Server.Database.Logging;
44
using Microsoft.EntityFrameworkCore;
55
using Microsoft.EntityFrameworkCore.Infrastructure;
6+
using Microsoft.EntityFrameworkCore.Metadata;
67
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
78

89
#nullable disable
@@ -16,9 +17,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)
1617
{
1718
#pragma warning disable 612, 618
1819
modelBuilder
19-
.HasAnnotation("ProductVersion", "7.0.11")
20+
.HasAnnotation("ProductVersion", "8.0.11")
2021
.HasAnnotation("Relational:MaxIdentifierLength", 64);
2122

23+
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
24+
2225
modelBuilder.Entity("Intersect.Server.Database.Logging.Entities.ChatHistory", b =>
2326
{
2427
b.Property<Guid>("Id")
@@ -175,8 +178,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
175178
.HasColumnOrder(0)
176179
.UseCollation("ascii_general_ci");
177180

178-
b.Property<byte>("Level")
179-
.HasColumnType("tinyint unsigned");
181+
b.Property<int>("Level")
182+
.HasColumnType("int");
180183

181184
b.Property<string>("Method")
182185
.HasColumnType("longtext");

0 commit comments

Comments
 (0)