Browse Source

Add "EasyAbp" prefix to Db tables.

pull/96/head
gdlcf88 6 years ago
parent
commit
27558cd882
  1. 4
      integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs
  2. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/OrdersDbProperties.cs
  3. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/PaymentsDbProperties.cs
  4. 4
      modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs
  5. 4
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs
  6. 4
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDbProperties.cs
  7. 4
      plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketsDbProperties.cs
  8. 3865
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.Designer.cs
  9. 837
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.cs
  10. 40
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

4
integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp/EShop/EShopDbProperties.cs

@ -2,10 +2,10 @@
{
public static class EShopDbProperties
{
public static string DbTablePrefix { get; set; } = "EShop";
public static string DbTablePrefix { get; set; } = "EasyAbpEShop";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShop";
public const string ConnectionStringName = "EasyAbpEShop";
}
}

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/OrdersDbProperties.cs

@ -2,10 +2,10 @@
{
public static class OrdersDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopOrders";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopOrders";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopOrders";
public const string ConnectionStringName = "EasyAbpEShopOrders";
}
}

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/PaymentsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class PaymentsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPayments";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPayments";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPayments";
public const string ConnectionStringName = "EasyAbpEShopPayments";
}
}

4
modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/PluginsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class PluginsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPlugins";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPlugins";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPlugins";
public const string ConnectionStringName = "EasyAbpEShopPlugins";
}
}

4
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/ProductsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class ProductsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopProducts";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopProducts";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopProducts";
public const string ConnectionStringName = "EasyAbpEShopProducts";
}
}

4
modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/StoresDbProperties.cs

@ -2,10 +2,10 @@
{
public static class StoresDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopStores";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopStores";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopStores";
public const string ConnectionStringName = "EasyAbpEShopStores";
}
}

4
plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp/EShop/Plugins/Baskets/BasketsDbProperties.cs

@ -2,10 +2,10 @@
{
public static class BasketsDbProperties
{
public static string DbTablePrefix { get; set; } = "EShopPluginsBaskets";
public static string DbTablePrefix { get; set; } = "EasyAbpEShopPluginsBaskets";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "EShopPluginsBaskets";
public const string ConnectionStringName = "EasyAbpEShopPluginsBaskets";
}
}

3865
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.Designer.cs

File diff suppressed because it is too large

837
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200825104114_AddedEasyAbpPrefix.cs

@ -0,0 +1,837 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class AddedEasyAbpPrefix : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
table: "EShopOrdersOrderLines");
migrationBuilder.DropForeignKey(
name: "FK_EShopPaymentsPaymentItems_EShopPaymentsPayments_PaymentId",
table: "EShopPaymentsPaymentItems");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsCategories_EShopProductsCategories_ParentId",
table: "EShopProductsCategories");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductAttributeOptions_EShopProductsProductAttributes_ProductAttributeId",
table: "EShopProductsProductAttributeOptions");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductAttributes_EShopProductsProducts_ProductId",
table: "EShopProductsProductAttributes");
migrationBuilder.DropForeignKey(
name: "FK_EShopProductsProductSkus_EShopProductsProducts_ProductId",
table: "EShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopStoresStores",
table: "EShopStoresStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductTypes",
table: "EShopProductsProductTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductStores",
table: "EShopProductsProductStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductSkus",
table: "EShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProducts",
table: "EShopProductsProducts");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductInventories",
table: "EShopProductsProductInventories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductHistories",
table: "EShopProductsProductHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductDetails",
table: "EShopProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductDetailHistories",
table: "EShopProductsProductDetailHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductCategories",
table: "EShopProductsProductCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductAttributes",
table: "EShopProductsProductAttributes");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsProductAttributeOptions",
table: "EShopProductsProductAttributeOptions");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopProductsCategories",
table: "EShopProductsCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPluginsBasketsProductUpdates",
table: "EShopPluginsBasketsProductUpdates");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPluginsBasketsBasketItems",
table: "EShopPluginsBasketsBasketItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsRefunds",
table: "EShopPaymentsRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsPayments",
table: "EShopPaymentsPayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopPaymentsPaymentItems",
table: "EShopPaymentsPaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopOrdersOrders",
table: "EShopOrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_EShopOrdersOrderLines",
table: "EShopOrdersOrderLines");
migrationBuilder.RenameTable(
name: "EShopStoresStores",
newName: "EasyAbpEShopStoresStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductTypes",
newName: "EasyAbpEShopProductsProductTypes");
migrationBuilder.RenameTable(
name: "EShopProductsProductStores",
newName: "EasyAbpEShopProductsProductStores");
migrationBuilder.RenameTable(
name: "EShopProductsProductSkus",
newName: "EasyAbpEShopProductsProductSkus");
migrationBuilder.RenameTable(
name: "EShopProductsProducts",
newName: "EasyAbpEShopProductsProducts");
migrationBuilder.RenameTable(
name: "EShopProductsProductInventories",
newName: "EasyAbpEShopProductsProductInventories");
migrationBuilder.RenameTable(
name: "EShopProductsProductHistories",
newName: "EasyAbpEShopProductsProductHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetails",
newName: "EasyAbpEShopProductsProductDetails");
migrationBuilder.RenameTable(
name: "EShopProductsProductDetailHistories",
newName: "EasyAbpEShopProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "EShopProductsProductCategories",
newName: "EasyAbpEShopProductsProductCategories");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributes",
newName: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.RenameTable(
name: "EShopProductsProductAttributeOptions",
newName: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "EShopProductsCategories",
newName: "EasyAbpEShopProductsCategories");
migrationBuilder.RenameTable(
name: "EShopPluginsBasketsProductUpdates",
newName: "EasyAbpEShopPluginsBasketsProductUpdates");
migrationBuilder.RenameTable(
name: "EShopPluginsBasketsBasketItems",
newName: "EasyAbpEShopPluginsBasketsBasketItems");
migrationBuilder.RenameTable(
name: "EShopPaymentsRefunds",
newName: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.RenameTable(
name: "EShopPaymentsPayments",
newName: "EasyAbpEShopPaymentsPayments");
migrationBuilder.RenameTable(
name: "EShopPaymentsPaymentItems",
newName: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EShopOrdersOrders",
newName: "EasyAbpEShopOrdersOrders");
migrationBuilder.RenameTable(
name: "EShopOrdersOrderLines",
newName: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductSkus_ProductId",
table: "EasyAbpEShopProductsProductSkus",
newName: "IX_EasyAbpEShopProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProducts_UniqueName",
table: "EasyAbpEShopProductsProducts",
newName: "IX_EasyAbpEShopProductsProducts_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductInventories_ProductSkuId",
table: "EasyAbpEShopProductsProductInventories",
newName: "IX_EasyAbpEShopProductsProductInventories_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ProductId",
table: "EasyAbpEShopProductsProductHistories",
newName: "IX_EasyAbpEShopProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductHistories_ModificationTime",
table: "EasyAbpEShopProductsProductHistories",
newName: "IX_EasyAbpEShopProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ProductDetailId",
table: "EasyAbpEShopProductsProductDetailHistories",
newName: "IX_EasyAbpEShopProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductDetailHistories_ModificationTime",
table: "EasyAbpEShopProductsProductDetailHistories",
newName: "IX_EasyAbpEShopProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributes_ProductId",
table: "EasyAbpEShopProductsProductAttributes",
newName: "IX_EasyAbpEShopProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsProductAttributeOptions_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions",
newName: "IX_EasyAbpEShopProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsCategories_UniqueName",
table: "EasyAbpEShopProductsCategories",
newName: "IX_EasyAbpEShopProductsCategories_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories",
newName: "IX_EasyAbpEShopProductsCategories_ParentId");
migrationBuilder.RenameIndex(
name: "IX_EShopPluginsBasketsProductUpdates_ProductSkuId",
table: "EasyAbpEShopPluginsBasketsProductUpdates",
newName: "IX_EasyAbpEShopPluginsBasketsProductUpdates_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EShopPluginsBasketsBasketItems_UserId",
table: "EasyAbpEShopPluginsBasketsBasketItems",
newName: "IX_EasyAbpEShopPluginsBasketsBasketItems_UserId");
migrationBuilder.RenameIndex(
name: "IX_EShopPaymentsPaymentItems_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems",
newName: "IX_EasyAbpEShopPaymentsPaymentItems_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EShopOrdersOrders_OrderNumber",
table: "EasyAbpEShopOrdersOrders",
newName: "IX_EasyAbpEShopOrdersOrders_OrderNumber");
migrationBuilder.RenameIndex(
name: "IX_EShopOrdersOrderLines_OrderId",
table: "EasyAbpEShopOrdersOrderLines",
newName: "IX_EasyAbpEShopOrdersOrderLines_OrderId");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopStoresStores",
table: "EasyAbpEShopStoresStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductTypes",
table: "EasyAbpEShopProductsProductTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductStores",
table: "EasyAbpEShopProductsProductStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductSkus",
table: "EasyAbpEShopProductsProductSkus",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProducts",
table: "EasyAbpEShopProductsProducts",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductInventories",
table: "EasyAbpEShopProductsProductInventories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductHistories",
table: "EasyAbpEShopProductsProductHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetails",
table: "EasyAbpEShopProductsProductDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetailHistories",
table: "EasyAbpEShopProductsProductDetailHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductCategories",
table: "EasyAbpEShopProductsProductCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributes",
table: "EasyAbpEShopProductsProductAttributes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributeOptions",
table: "EasyAbpEShopProductsProductAttributeOptions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopProductsCategories",
table: "EasyAbpEShopProductsCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsProductUpdates",
table: "EasyAbpEShopPluginsBasketsProductUpdates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsBasketItems",
table: "EasyAbpEShopPluginsBasketsBasketItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsRefunds",
table: "EasyAbpEShopPaymentsRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPayments",
table: "EasyAbpEShopPaymentsPayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPaymentItems",
table: "EasyAbpEShopPaymentsPaymentItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrders",
table: "EasyAbpEShopOrdersOrders",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrderLines",
table: "EasyAbpEShopOrdersOrderLines",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopOrdersOrderLines_EasyAbpEShopOrdersOrders_OrderId",
table: "EasyAbpEShopOrdersOrderLines",
column: "OrderId",
principalTable: "EasyAbpEShopOrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopPaymentsPaymentItems_EasyAbpEShopPaymentsPayments_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems",
column: "PaymentId",
principalTable: "EasyAbpEShopPaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsCategories_EasyAbpEShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories",
column: "ParentId",
principalTable: "EasyAbpEShopProductsCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributeOptions_EasyAbpEShopProductsProductAttributes_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions",
column: "ProductAttributeId",
principalTable: "EasyAbpEShopProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributes_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductAttributes",
column: "ProductId",
principalTable: "EasyAbpEShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EasyAbpEShopProductsProductSkus_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductSkus",
column: "ProductId",
principalTable: "EasyAbpEShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopOrdersOrderLines_EasyAbpEShopOrdersOrders_OrderId",
table: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopPaymentsPaymentItems_EasyAbpEShopPaymentsPayments_PaymentId",
table: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsCategories_EasyAbpEShopProductsCategories_ParentId",
table: "EasyAbpEShopProductsCategories");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributeOptions_EasyAbpEShopProductsProductAttributes_ProductAttributeId",
table: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductAttributes_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.DropForeignKey(
name: "FK_EasyAbpEShopProductsProductSkus_EasyAbpEShopProductsProducts_ProductId",
table: "EasyAbpEShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopStoresStores",
table: "EasyAbpEShopStoresStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductTypes",
table: "EasyAbpEShopProductsProductTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductStores",
table: "EasyAbpEShopProductsProductStores");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductSkus",
table: "EasyAbpEShopProductsProductSkus");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProducts",
table: "EasyAbpEShopProductsProducts");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductInventories",
table: "EasyAbpEShopProductsProductInventories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductHistories",
table: "EasyAbpEShopProductsProductHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetails",
table: "EasyAbpEShopProductsProductDetails");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductDetailHistories",
table: "EasyAbpEShopProductsProductDetailHistories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductCategories",
table: "EasyAbpEShopProductsProductCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributes",
table: "EasyAbpEShopProductsProductAttributes");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsProductAttributeOptions",
table: "EasyAbpEShopProductsProductAttributeOptions");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopProductsCategories",
table: "EasyAbpEShopProductsCategories");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsProductUpdates",
table: "EasyAbpEShopPluginsBasketsProductUpdates");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPluginsBasketsBasketItems",
table: "EasyAbpEShopPluginsBasketsBasketItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsRefunds",
table: "EasyAbpEShopPaymentsRefunds");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPayments",
table: "EasyAbpEShopPaymentsPayments");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopPaymentsPaymentItems",
table: "EasyAbpEShopPaymentsPaymentItems");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrders",
table: "EasyAbpEShopOrdersOrders");
migrationBuilder.DropPrimaryKey(
name: "PK_EasyAbpEShopOrdersOrderLines",
table: "EasyAbpEShopOrdersOrderLines");
migrationBuilder.RenameTable(
name: "EasyAbpEShopStoresStores",
newName: "EShopStoresStores");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductTypes",
newName: "EShopProductsProductTypes");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductStores",
newName: "EShopProductsProductStores");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductSkus",
newName: "EShopProductsProductSkus");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProducts",
newName: "EShopProductsProducts");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductInventories",
newName: "EShopProductsProductInventories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductHistories",
newName: "EShopProductsProductHistories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductDetails",
newName: "EShopProductsProductDetails");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductDetailHistories",
newName: "EShopProductsProductDetailHistories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductCategories",
newName: "EShopProductsProductCategories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductAttributes",
newName: "EShopProductsProductAttributes");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsProductAttributeOptions",
newName: "EShopProductsProductAttributeOptions");
migrationBuilder.RenameTable(
name: "EasyAbpEShopProductsCategories",
newName: "EShopProductsCategories");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPluginsBasketsProductUpdates",
newName: "EShopPluginsBasketsProductUpdates");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPluginsBasketsBasketItems",
newName: "EShopPluginsBasketsBasketItems");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsRefunds",
newName: "EShopPaymentsRefunds");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsPayments",
newName: "EShopPaymentsPayments");
migrationBuilder.RenameTable(
name: "EasyAbpEShopPaymentsPaymentItems",
newName: "EShopPaymentsPaymentItems");
migrationBuilder.RenameTable(
name: "EasyAbpEShopOrdersOrders",
newName: "EShopOrdersOrders");
migrationBuilder.RenameTable(
name: "EasyAbpEShopOrdersOrderLines",
newName: "EShopOrdersOrderLines");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductSkus_ProductId",
table: "EShopProductsProductSkus",
newName: "IX_EShopProductsProductSkus_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProducts_UniqueName",
table: "EShopProductsProducts",
newName: "IX_EShopProductsProducts_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductInventories_ProductSkuId",
table: "EShopProductsProductInventories",
newName: "IX_EShopProductsProductInventories_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductHistories_ProductId",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductHistories_ModificationTime",
table: "EShopProductsProductHistories",
newName: "IX_EShopProductsProductHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductDetailHistories_ProductDetailId",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ProductDetailId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductDetailHistories_ModificationTime",
table: "EShopProductsProductDetailHistories",
newName: "IX_EShopProductsProductDetailHistories_ModificationTime");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductAttributes_ProductId",
table: "EShopProductsProductAttributes",
newName: "IX_EShopProductsProductAttributes_ProductId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsProductAttributeOptions_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
newName: "IX_EShopProductsProductAttributeOptions_ProductAttributeId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsCategories_UniqueName",
table: "EShopProductsCategories",
newName: "IX_EShopProductsCategories_UniqueName");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopProductsCategories_ParentId",
table: "EShopProductsCategories",
newName: "IX_EShopProductsCategories_ParentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPluginsBasketsProductUpdates_ProductSkuId",
table: "EShopPluginsBasketsProductUpdates",
newName: "IX_EShopPluginsBasketsProductUpdates_ProductSkuId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPluginsBasketsBasketItems_UserId",
table: "EShopPluginsBasketsBasketItems",
newName: "IX_EShopPluginsBasketsBasketItems_UserId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopPaymentsPaymentItems_PaymentId",
table: "EShopPaymentsPaymentItems",
newName: "IX_EShopPaymentsPaymentItems_PaymentId");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopOrdersOrders_OrderNumber",
table: "EShopOrdersOrders",
newName: "IX_EShopOrdersOrders_OrderNumber");
migrationBuilder.RenameIndex(
name: "IX_EasyAbpEShopOrdersOrderLines_OrderId",
table: "EShopOrdersOrderLines",
newName: "IX_EShopOrdersOrderLines_OrderId");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopStoresStores",
table: "EShopStoresStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductTypes",
table: "EShopProductsProductTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductStores",
table: "EShopProductsProductStores",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductSkus",
table: "EShopProductsProductSkus",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProducts",
table: "EShopProductsProducts",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductInventories",
table: "EShopProductsProductInventories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductHistories",
table: "EShopProductsProductHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductDetails",
table: "EShopProductsProductDetails",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductDetailHistories",
table: "EShopProductsProductDetailHistories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductCategories",
table: "EShopProductsProductCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductAttributes",
table: "EShopProductsProductAttributes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsProductAttributeOptions",
table: "EShopProductsProductAttributeOptions",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopProductsCategories",
table: "EShopProductsCategories",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPluginsBasketsProductUpdates",
table: "EShopPluginsBasketsProductUpdates",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPluginsBasketsBasketItems",
table: "EShopPluginsBasketsBasketItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsRefunds",
table: "EShopPaymentsRefunds",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsPayments",
table: "EShopPaymentsPayments",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopPaymentsPaymentItems",
table: "EShopPaymentsPaymentItems",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopOrdersOrders",
table: "EShopOrdersOrders",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_EShopOrdersOrderLines",
table: "EShopOrdersOrderLines",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_EShopOrdersOrderLines_EShopOrdersOrders_OrderId",
table: "EShopOrdersOrderLines",
column: "OrderId",
principalTable: "EShopOrdersOrders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopPaymentsPaymentItems_EShopPaymentsPayments_PaymentId",
table: "EShopPaymentsPaymentItems",
column: "PaymentId",
principalTable: "EShopPaymentsPayments",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsCategories_EShopProductsCategories_ParentId",
table: "EShopProductsCategories",
column: "ParentId",
principalTable: "EShopProductsCategories",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductAttributeOptions_EShopProductsProductAttributes_ProductAttributeId",
table: "EShopProductsProductAttributeOptions",
column: "ProductAttributeId",
principalTable: "EShopProductsProductAttributes",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductAttributes_EShopProductsProducts_ProductId",
table: "EShopProductsProductAttributes",
column: "ProductId",
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_EShopProductsProductSkus_EShopProductsProducts_ProductId",
table: "EShopProductsProductSkus",
column: "ProductId",
principalTable: "EShopProductsProducts",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

40
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

@ -128,7 +128,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[OrderNumber] IS NOT NULL");
b.ToTable("EShopOrdersOrders");
b.ToTable("EasyAbpEShopOrdersOrders");
});
modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
@ -219,7 +219,7 @@ namespace EShopSample.Migrations
b.HasIndex("OrderId");
b.ToTable("EShopOrdersOrderLines");
b.ToTable("EasyAbpEShopOrdersOrderLines");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
@ -310,7 +310,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopPaymentsPayments");
b.ToTable("EasyAbpEShopPaymentsPayments");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
@ -387,7 +387,7 @@ namespace EShopSample.Migrations
b.HasIndex("PaymentId");
b.ToTable("EShopPaymentsPaymentItems");
b.ToTable("EasyAbpEShopPaymentsPaymentItems");
});
modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
@ -474,7 +474,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopPaymentsRefunds");
b.ToTable("EasyAbpEShopPaymentsRefunds");
});
modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b =>
@ -568,7 +568,7 @@ namespace EShopSample.Migrations
b.HasIndex("UserId");
b.ToTable("EShopPluginsBasketsBasketItems");
b.ToTable("EasyAbpEShopPluginsBasketsBasketItems");
});
modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b =>
@ -624,7 +624,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductSkuId");
b.ToTable("EShopPluginsBasketsProductUpdates");
b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
@ -709,7 +709,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[UniqueName] IS NOT NULL");
b.ToTable("EShopProductsCategories");
b.ToTable("EasyAbpEShopProductsCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
@ -759,7 +759,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductCategories");
b.ToTable("EasyAbpEShopProductsProductCategories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b =>
@ -793,7 +793,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductDetailId");
b.ToTable("EShopProductsProductDetailHistories");
b.ToTable("EasyAbpEShopProductsProductDetailHistories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b =>
@ -847,7 +847,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductDetails");
b.ToTable("EasyAbpEShopProductsProductDetails");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b =>
@ -881,7 +881,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductHistories");
b.ToTable("EasyAbpEShopProductsProductHistories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductInventories.ProductInventory", b =>
@ -946,7 +946,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductSkuId");
b.ToTable("EShopProductsProductInventories");
b.ToTable("EasyAbpEShopProductsProductInventories");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
@ -1010,7 +1010,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductStores");
b.ToTable("EasyAbpEShopProductsProductStores");
});
modelBuilder.Entity("EasyAbp.EShop.Products.ProductTypes.ProductType", b =>
@ -1073,7 +1073,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopProductsProductTypes");
b.ToTable("EasyAbpEShopProductsProductTypes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.Product", b =>
@ -1161,7 +1161,7 @@ namespace EShopSample.Migrations
.IsUnique()
.HasFilter("[UniqueName] IS NOT NULL");
b.ToTable("EShopProductsProducts");
b.ToTable("EasyAbpEShopProductsProducts");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttribute", b =>
@ -1216,7 +1216,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductAttributes");
b.ToTable("EasyAbpEShopProductsProductAttributes");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductAttributeOption", b =>
@ -1271,7 +1271,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductAttributeId");
b.ToTable("EShopProductsProductAttributeOptions");
b.ToTable("EasyAbpEShopProductsProductAttributeOptions");
});
modelBuilder.Entity("EasyAbp.EShop.Products.Products.ProductSku", b =>
@ -1347,7 +1347,7 @@ namespace EShopSample.Migrations
b.HasIndex("ProductId");
b.ToTable("EShopProductsProductSkus");
b.ToTable("EasyAbpEShopProductsProductSkus");
});
modelBuilder.Entity("EasyAbp.EShop.Stores.Stores.Store", b =>
@ -1405,7 +1405,7 @@ namespace EShopSample.Migrations
b.HasKey("Id");
b.ToTable("EShopStoresStores");
b.ToTable("EasyAbpEShopStoresStores");
});
modelBuilder.Entity("EasyAbp.PaymentService.Payments.Payment", b =>

Loading…
Cancel
Save