src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20161103153420_UpdateTableNames.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Microsoft.EntityFrameworkCore.Migrations;
namespace Catalog.API.Infrastructure.Migrations
{
public partial class UpdateTableNames : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_catalog_catalogbrand_CatalogBrandId",
table: "catalog");
migrationBuilder.DropForeignKey(
name: "FK_catalog_CatalogTypes_CatalogTypeId",
table: "catalog");
migrationBuilder.DropPrimaryKey(
name: "PK_CatalogTypes",
table: "CatalogTypes");
migrationBuilder.DropPrimaryKey(
name: "PK_catalog",
table: "catalog");
migrationBuilder.DropPrimaryKey(
name: "PK_catalogbrand",
table: "catalogbrand");
migrationBuilder.AddPrimaryKey(
name: "PK_CatalogType",
table: "CatalogTypes",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_Catalog",
table: "catalog",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_CatalogBrand",
table: "catalogbrand",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Catalog_CatalogBrand_CatalogBrandId",
table: "catalog",
column: "CatalogBrandId",
principalTable: "catalogbrand",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Catalog_CatalogType_CatalogTypeId",
table: "catalog",
column: "CatalogTypeId",
principalTable: "CatalogTypes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.RenameIndex(
后面还有 99 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。