Fix all to Dotnet9

This commit is contained in:
2025-04-02 13:26:13 -04:00
parent 98fc6329b5
commit 914440087e
10 changed files with 44 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ on:
env:
AZURE_WEBAPP_NAME: hutopy-backend-api
DOTNET_VERSION: '8.0.x'
DOTNET_VERSION: '9.0.x'
jobs:
build_and_deploy:

View File

@@ -1,7 +1,7 @@
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

View File

@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.203",
"version": "9.0.201",
"rollForward": "latestMinor",
"allowPrerelease": false
}

View File

@@ -50,7 +50,7 @@ public class PresentationInfos
[MaxLength(10000)] public string ImagesText { get; set; } = string.Empty;
[MaxLength(2000)] public string VideoSubtitle { get; set; } = string.Empty;
[MaxLength(2000)] public string VideoSubtitleMain { get; set; } = string.Empty;
[MaxLength(2000)] public string VideoUrlMain { get; set; } = string.Empty;
[MaxLength(1024)] public string VideoUrlMain { get; set; } = string.Empty;
[MaxLength(1024)] public string VideoUrl { get; set; } = string.Empty;
[MaxLength(10000)] public string VideoText { get; set; } = string.Empty;
}

View File

@@ -21,7 +21,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Content")
.HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("ProductVersion", "8.0.14")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -303,8 +303,8 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b1.Property<string>("VideoUrlMain")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b1.HasKey("CreatorId");

View File

@@ -116,7 +116,18 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
oldClrType: typeof(string),
oldType: "character varying(2000)",
oldMaxLength: 2000);
migrationBuilder.AlterColumn<string>(
name: "VideoUrlMain",
schema: "Content",
table: "PresentationInfos",
type: "character varying(1024)",
maxLength: 1024,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(2000)",
oldMaxLength: 2000);
migrationBuilder.AlterColumn<string>(
name: "MainImageUrl",
schema: "Content",
@@ -306,7 +317,18 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn<string>(
name: "VideoUrlMain",
schema: "Content",
table: "PresentationInfos",
type: "character varying(2000)",
maxLength: 2000,
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(1024)",
oldMaxLength: 1024);
migrationBuilder.AlterColumn<string>(
name: "MainImageUrl",
schema: "Content",

View File

@@ -300,8 +300,8 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b1.Property<string>("VideoUrlMain")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b1.HasKey("CreatorId");

View File

@@ -18,7 +18,7 @@ namespace Hutopy.Web.Features.Memberships.Data.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Membership")
.HasAnnotation("ProductVersion", "8.0.14")
.HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

View File

@@ -18,7 +18,7 @@ namespace Hutopy.Web.Features.Messages.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Messaging")
.HasAnnotation("ProductVersion", "8.0.10")
.HasAnnotation("ProductVersion", "9.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

View File

@@ -12,16 +12,16 @@
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="FastEndpoints" Version="5.35.0" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.14" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.14" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="NSwag.AspNetCore" Version="14.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.14">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>