14 changed files with 280 additions and 36 deletions
@ -0,0 +1,162 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using LY.MicroService.WebhooksManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace LY.MicroService.WebhooksManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(WebhooksManagementMigrationsDbContext))] |
|||
[Migration("20220409053632_Reset-Field-Secret-To-Not-Required")] |
|||
partial class ResetFieldSecretToNotRequired |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|||
.HasAnnotation("ProductVersion", "6.0.3") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<string>("Data") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("Data"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("tinyint(1)") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<string>("WebhookName") |
|||
.IsRequired() |
|||
.HasMaxLength(100) |
|||
.HasColumnType("varchar(100)") |
|||
.HasColumnName("WebhookName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpWebhooksEvents", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<string>("Response") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("Response"); |
|||
|
|||
b.Property<int?>("ResponseStatusCode") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<Guid>("WebhookEventId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<Guid>("WebhookSubscriptionId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("WebhookEventId"); |
|||
|
|||
b.ToTable("AbpWebhooksSendAttempts", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("Headers") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("Headers"); |
|||
|
|||
b.Property<bool>("IsActive") |
|||
.HasColumnType("tinyint(1)"); |
|||
|
|||
b.Property<string>("Secret") |
|||
.HasMaxLength(128) |
|||
.HasColumnType("varchar(128)") |
|||
.HasColumnName("Secret"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("char(36)"); |
|||
|
|||
b.Property<string>("WebhookUri") |
|||
.IsRequired() |
|||
.HasMaxLength(255) |
|||
.HasColumnType("varchar(255)") |
|||
.HasColumnName("WebhookUri"); |
|||
|
|||
b.Property<string>("Webhooks") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("Webhooks"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpWebhooksSubscriptions", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b => |
|||
{ |
|||
b.HasOne("LINGYUN.Abp.WebhooksManagement.WebhookEventRecord", "WebhookEvent") |
|||
.WithOne() |
|||
.HasForeignKey("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", "WebhookEventId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
b.Navigation("WebhookEvent"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace LY.MicroService.WebhooksManagement.Migrations |
|||
{ |
|||
public partial class ResetFieldSecretToNotRequired : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Secret", |
|||
table: "AbpWebhooksSubscriptions", |
|||
type: "varchar(128)", |
|||
maxLength: 128, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "varchar(128)", |
|||
oldMaxLength: 128) |
|||
.Annotation("MySql:CharSet", "utf8mb4") |
|||
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.UpdateData( |
|||
table: "AbpWebhooksSubscriptions", |
|||
keyColumn: "Secret", |
|||
keyValue: null, |
|||
column: "Secret", |
|||
value: ""); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Secret", |
|||
table: "AbpWebhooksSubscriptions", |
|||
type: "varchar(128)", |
|||
maxLength: 128, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "varchar(128)", |
|||
oldMaxLength: 128, |
|||
oldNullable: true) |
|||
.Annotation("MySql:CharSet", "utf8mb4") |
|||
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue