Browse Source

fix(notifications): fix notification template length.

pull/893/head
colin 2 years ago
parent
commit
f641f3d52a
  1. 5315
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.Designer.cs
  2. 42
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.cs
  3. 3
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/SingleMigrationsDbContextModelSnapshot.cs
  4. 2
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/NotificationsDbContextModelCreatingExtensions.cs

5315
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.Designer.cs

File diff suppressed because it is too large

42
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.cs

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
{
/// <inheritdoc />
public partial class FixNotificationTemplateLength : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Template",
table: "AppNotificationDefinitions",
type: "varchar(128)",
maxLength: 128,
nullable: true,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Template",
table: "AppNotificationDefinitions",
type: "longtext",
nullable: true,
oldClrType: typeof(string),
oldType: "varchar(128)",
oldMaxLength: 128,
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

3
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/SingleMigrationsDbContextModelSnapshot.cs

@ -798,7 +798,8 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
.HasColumnType("varchar(200)"); .HasColumnType("varchar(200)");
b.Property<string>("Template") b.Property<string>("Template")
.HasColumnType("longtext"); .HasMaxLength(128)
.HasColumnType("varchar(128)");
b.HasKey("Id"); b.HasKey("Id");

2
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/NotificationsDbContextModelCreatingExtensions.cs

@ -103,6 +103,8 @@ namespace LINGYUN.Abp.Notifications.EntityFrameworkCore
.HasMaxLength(NotificationDefinitionRecordConsts.MaxDescriptionLength); .HasMaxLength(NotificationDefinitionRecordConsts.MaxDescriptionLength);
b.Property(p => p.Providers) b.Property(p => p.Providers)
.HasMaxLength(NotificationDefinitionRecordConsts.MaxProvidersLength); .HasMaxLength(NotificationDefinitionRecordConsts.MaxProvidersLength);
b.Property(p => p.Template)
.HasMaxLength(NotificationDefinitionRecordConsts.MaxTemplateLength);
b.Property(p => p.ContentType) b.Property(p => p.ContentType)
.HasDefaultValue(NotificationContentType.Text); .HasDefaultValue(NotificationContentType.Text);

Loading…
Cancel
Save