Browse Source

perf(webhooks): renames the table prefix

pull/532/head
cKey 4 years ago
parent
commit
444ef0b563
  1. 2
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDbProperties.cs
  2. 6
      aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore/LINGYUN/Abp/WebhooksManagement/EntityFrameworkCore/WebhooksManagementDbContextModelCreatingExtensions.cs
  3. 8
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326052244_Add-Module-WebHooks-Management.Designer.cs
  4. 26
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326052244_Add-Module-WebHooks-Management.cs
  5. 6
      aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs

2
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDbProperties.cs

@ -2,7 +2,7 @@
public static class WebhooksManagementDbProperties
{
public static string DbTablePrefix { get; set; } = "WebhooksManagement_";
public static string DbTablePrefix { get; set; } = "AbpWebhooks";
public static string DbSchema { get; set; } = null;

6
aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore/LINGYUN/Abp/WebhooksManagement/EntityFrameworkCore/WebhooksManagementDbContextModelCreatingExtensions.cs

@ -21,7 +21,7 @@ public static class WebhooksManagementDbContextModelCreatingExtensions
builder.Entity<WebhookEventRecord>(b =>
{
b.ToTable(options.TablePrefix + "WebhookEvents", options.Schema);
b.ToTable(options.TablePrefix + "Events", options.Schema);
b.Property(p => p.WebhookName)
.IsRequired()
@ -36,7 +36,7 @@ public static class WebhooksManagementDbContextModelCreatingExtensions
builder.Entity<WebhookSendRecord>(b =>
{
b.ToTable(options.TablePrefix + "WebhookSendAttempts", options.Schema);
b.ToTable(options.TablePrefix + "SendAttempts", options.Schema);
b.Property(p => p.Response)
.HasColumnName(nameof(WebhookSendRecord.Response))
@ -52,7 +52,7 @@ public static class WebhooksManagementDbContextModelCreatingExtensions
builder.Entity<WebhookSubscription>(b =>
{
b.ToTable(options.TablePrefix + "WebhookSubscriptions", options.Schema);
b.ToTable(options.TablePrefix + "Subscriptions", options.Schema);
b.Property(p => p.WebhookUri)
.IsRequired()

8
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326030345_Add-Module-WebHooks-Management.Designer.cs → aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326052244_Add-Module-WebHooks-Management.Designer.cs

@ -12,7 +12,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.WebhooksManagement.Migrations
{
[DbContext(typeof(WebhooksManagementMigrationsDbContext))]
[Migration("20220326030345_Add-Module-WebHooks-Management")]
[Migration("20220326052244_Add-Module-WebHooks-Management")]
partial class AddModuleWebHooksManagement
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -60,7 +60,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasKey("Id");
b.ToTable("WebhooksManagement_WebhookEvents", (string)null);
b.ToTable("AbpWebhooksEvents", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>
@ -100,7 +100,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasIndex("WebhookEventId")
.IsUnique();
b.ToTable("WebhooksManagement_WebhookSendAttempts", (string)null);
b.ToTable("AbpWebhooksSendAttempts", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b =>
@ -147,7 +147,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasKey("Id");
b.ToTable("WebhooksManagement_WebhookSubscriptions", (string)null);
b.ToTable("AbpWebhooksSubscriptions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>

26
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326030345_Add-Module-WebHooks-Management.cs → aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/20220326052244_Add-Module-WebHooks-Management.cs

@ -13,7 +13,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "WebhooksManagement_WebhookEvents",
name: "AbpWebhooksEvents",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
@ -28,12 +28,12 @@ namespace LY.MicroService.WebhooksManagement.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_WebhooksManagement_WebhookEvents", x => x.Id);
table.PrimaryKey("PK_AbpWebhooksEvents", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "WebhooksManagement_WebhookSubscriptions",
name: "AbpWebhooksSubscriptions",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
@ -52,12 +52,12 @@ namespace LY.MicroService.WebhooksManagement.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_WebhooksManagement_WebhookSubscriptions", x => x.Id);
table.PrimaryKey("PK_AbpWebhooksSubscriptions", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "WebhooksManagement_WebhookSendAttempts",
name: "AbpWebhooksSendAttempts",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
@ -72,19 +72,19 @@ namespace LY.MicroService.WebhooksManagement.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_WebhooksManagement_WebhookSendAttempts", x => x.Id);
table.PrimaryKey("PK_AbpWebhooksSendAttempts", x => x.Id);
table.ForeignKey(
name: "FK_WebhooksManagement_WebhookSendAttempts_WebhooksManagement_We~",
name: "FK_AbpWebhooksSendAttempts_AbpWebhooksEvents_WebhookEventId",
column: x => x.WebhookEventId,
principalTable: "WebhooksManagement_WebhookEvents",
principalTable: "AbpWebhooksEvents",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_WebhooksManagement_WebhookSendAttempts_WebhookEventId",
table: "WebhooksManagement_WebhookSendAttempts",
name: "IX_AbpWebhooksSendAttempts_WebhookEventId",
table: "AbpWebhooksSendAttempts",
column: "WebhookEventId",
unique: true);
}
@ -92,13 +92,13 @@ namespace LY.MicroService.WebhooksManagement.Migrations
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "WebhooksManagement_WebhookSendAttempts");
name: "AbpWebhooksSendAttempts");
migrationBuilder.DropTable(
name: "WebhooksManagement_WebhookSubscriptions");
name: "AbpWebhooksSubscriptions");
migrationBuilder.DropTable(
name: "WebhooksManagement_WebhookEvents");
name: "AbpWebhooksEvents");
}
}
}

6
aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Migrations/WebhooksManagementMigrationsDbContextModelSnapshot.cs

@ -58,7 +58,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasKey("Id");
b.ToTable("WebhooksManagement_WebhookEvents", (string)null);
b.ToTable("AbpWebhooksEvents", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>
@ -98,7 +98,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasIndex("WebhookEventId")
.IsUnique();
b.ToTable("WebhooksManagement_WebhookSendAttempts", (string)null);
b.ToTable("AbpWebhooksSendAttempts", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSubscription", b =>
@ -145,7 +145,7 @@ namespace LY.MicroService.WebhooksManagement.Migrations
b.HasKey("Id");
b.ToTable("WebhooksManagement_WebhookSubscriptions", (string)null);
b.ToTable("AbpWebhooksSubscriptions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.WebhooksManagement.WebhookSendRecord", b =>

Loading…
Cancel
Save