using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace FlexJobApi.Database.Migrations.Migrations
{
///
public partial class UpdateEnterprise : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_FileVirtualPath_IdentityBackImgId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_FileVirtualPath_IdentityImgId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_FileVirtualPath_LicenseImageId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_UserAuth_FileVirtualPath_AvatarId",
table: "UserAuth");
migrationBuilder.DropForeignKey(
name: "FK_UserAuth_FileVirtualPath_BankCardImgId",
table: "UserAuth");
migrationBuilder.DropForeignKey(
name: "FK_UserAuth_FileVirtualPath_IdentityBackImgId",
table: "UserAuth");
migrationBuilder.DropForeignKey(
name: "FK_UserAuth_FileVirtualPath_IdentityImgId",
table: "UserAuth");
migrationBuilder.DropForeignKey(
name: "FK_UserInfoCredential_FileVirtualPath_BackImgId",
table: "UserInfoCredential");
migrationBuilder.DropForeignKey(
name: "FK_UserInfoCredential_FileVirtualPath_ImgId",
table: "UserInfoCredential");
migrationBuilder.DropForeignKey(
name: "FK_UserInfoPhoto_FileVirtualPath_ImgId",
table: "UserInfoPhoto");
migrationBuilder.DropTable(
name: "FileVirtualPath");
migrationBuilder.DropTable(
name: "FileStore");
migrationBuilder.DropIndex(
name: "IX_UserInfoPhoto_ImgId",
table: "UserInfoPhoto");
migrationBuilder.DropIndex(
name: "IX_UserInfoCredential_BackImgId",
table: "UserInfoCredential");
migrationBuilder.DropIndex(
name: "IX_UserInfoCredential_ImgId",
table: "UserInfoCredential");
migrationBuilder.DropIndex(
name: "IX_UserAuth_AvatarId",
table: "UserAuth");
migrationBuilder.DropIndex(
name: "IX_UserAuth_BankCardImgId",
table: "UserAuth");
migrationBuilder.DropIndex(
name: "IX_UserAuth_IdentityBackImgId",
table: "UserAuth");
migrationBuilder.DropIndex(
name: "IX_UserAuth_IdentityImgId",
table: "UserAuth");
migrationBuilder.DropIndex(
name: "IX_Enterprise_IdentityBackImgId",
table: "Enterprise");
migrationBuilder.DropIndex(
name: "IX_Enterprise_IdentityImgId",
table: "Enterprise");
migrationBuilder.DropIndex(
name: "IX_Enterprise_LicenseImageId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ImgId",
table: "UserInfoPhoto");
migrationBuilder.DropColumn(
name: "BackImgId",
table: "UserInfoCredential");
migrationBuilder.DropColumn(
name: "ImgId",
table: "UserInfoCredential");
migrationBuilder.DropColumn(
name: "AvatarId",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "BankCardImgId",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "IdentityBackImgId",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "IdentityImgId",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "BankCardImgId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ContactNumber",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "EnterpriseName",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "EnterpriseRealMethod",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "Identity",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "IdentityBackImgId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "IdentityImgId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "IsReal",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "LegalPerson",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "LicenseImageId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "Name",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "PersonalRealMethod",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "PhoneNumber",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "Proxy",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ProxyPowerAttorneyUrl",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "SocietyCreditCode",
table: "Enterprise");
migrationBuilder.AddColumn(
name: "Img",
table: "UserInfoPhoto",
type: "nvarchar(max)",
nullable: true,
comment: "照片");
migrationBuilder.AddColumn(
name: "BackImg",
table: "UserInfoCredential",
type: "nvarchar(max)",
nullable: true,
comment: "证书反面照片");
migrationBuilder.AddColumn(
name: "Img",
table: "UserInfoCredential",
type: "nvarchar(max)",
nullable: true,
comment: "证书正面照片");
migrationBuilder.AddColumn(
name: "Avatar",
table: "UserInfo",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "ProvinceId",
table: "UserInfo",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn(
name: "BankCardImg",
table: "UserAuth",
type: "nvarchar(max)",
nullable: true,
comment: "银行卡照片");
migrationBuilder.AddColumn(
name: "IdentityBackImg",
table: "UserAuth",
type: "nvarchar(max)",
nullable: true,
comment: "身份证国徽面");
migrationBuilder.AddColumn(
name: "IdentityImg",
table: "UserAuth",
type: "nvarchar(max)",
nullable: true,
comment: "身份证人像面");
migrationBuilder.AddColumn(
name: "BankBranchName",
table: "Enterprise",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "BankName",
table: "Enterprise",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "CityId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn(
name: "ContactEmail",
table: "Enterprise",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "ContactPhoneNumber",
table: "Enterprise",
type: "nvarchar(11)",
maxLength: 11,
nullable: true);
migrationBuilder.AddColumn(
name: "EnterpriseAuthId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn(
name: "IndustryTypeId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn(
name: "IsCheckedBankCard",
table: "Enterprise",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn(
name: "MainBusiness",
table: "Enterprise",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn(
name: "MergeSignCost",
table: "Enterprise",
type: "decimal(18,2)",
nullable: true);
migrationBuilder.AddColumn(
name: "PayAccess",
table: "Enterprise",
type: "int",
nullable: true);
migrationBuilder.AddColumn(
name: "ProvinceId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn(
name: "RealVerifyCost",
table: "Enterprise",
type: "decimal(18,2)",
nullable: true);
migrationBuilder.AddColumn(
name: "SignCost",
table: "Enterprise",
type: "decimal(18,2)",
nullable: true);
migrationBuilder.AddColumn(
name: "SmsAccess",
table: "Enterprise",
type: "int",
nullable: true);
migrationBuilder.AddColumn(
name: "SmsCost",
table: "Enterprise",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.CreateTable(
name: "EnterpriseAuth",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
EnterpriseRealMethod = table.Column(type: "int", nullable: true),
EnterpriseName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false),
SocietyCreditCode = table.Column(type: "nvarchar(18)", maxLength: 18, nullable: false),
LicenseImage = table.Column(type: "nvarchar(max)", nullable: true),
LegalPerson = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true),
LegalIdentity = table.Column(type: "nvarchar(18)", maxLength: 18, nullable: true),
PersonalRealMethod = table.Column(type: "int", nullable: true),
Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true),
Identity = table.Column(type: "nvarchar(18)", maxLength: 18, nullable: true),
IdentityImg = table.Column(type: "nvarchar(max)", nullable: true),
IdentityBackImg = table.Column(type: "nvarchar(max)", nullable: true),
BankCard = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: true),
BankCardImg = table.Column(type: "nvarchar(max)", nullable: true),
PhoneNumber = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: true),
Proxy = table.Column(type: "bit", nullable: true),
ProxyPowerAttorneyUrl = table.Column(type: "nvarchar(max)", nullable: true),
IsReal = table.Column(type: "bit", nullable: false),
CreatedTime = table.Column(type: "datetimeoffset", nullable: false),
UpdatedTime = table.Column(type: "datetimeoffset", nullable: true),
Sort = table.Column(type: "int", nullable: false, comment: "排序"),
TraceId = table.Column(type: "nvarchar(max)", nullable: true, comment: "跟踪Id"),
CreatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "创建操作人"),
UpdatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "最后更新操作人"),
IsDeleted = table.Column(type: "bit", nullable: false, comment: "是否删除")
},
constraints: table =>
{
table.PrimaryKey("PK_EnterpriseAuth", x => x.Id);
});
migrationBuilder.UpdateData(
table: "UserAuth",
keyColumn: "Id",
keyValue: new Guid("11111111-1111-1111-1111-111111111111"),
columns: new[] { "BankCardImg", "IdentityBackImg", "IdentityImg" },
values: new object[] { null, null, null });
migrationBuilder.UpdateData(
table: "UserInfo",
keyColumn: "Id",
keyValue: new Guid("11111111-1111-1111-1111-111111111112"),
columns: new[] { "Avatar", "ProvinceId" },
values: new object[] { null, null });
migrationBuilder.CreateIndex(
name: "IX_UserInfo_ProvinceId",
table: "UserInfo",
column: "ProvinceId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_CityId",
table: "Enterprise",
column: "CityId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_EnterpriseAuthId",
table: "Enterprise",
column: "EnterpriseAuthId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_IndustryTypeId",
table: "Enterprise",
column: "IndustryTypeId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_ProvinceId",
table: "Enterprise",
column: "ProvinceId");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_DictionaryData_CityId",
table: "Enterprise",
column: "CityId",
principalTable: "DictionaryData",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_DictionaryData_IndustryTypeId",
table: "Enterprise",
column: "IndustryTypeId",
principalTable: "DictionaryData",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_DictionaryData_ProvinceId",
table: "Enterprise",
column: "ProvinceId",
principalTable: "DictionaryData",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_EnterpriseAuth_EnterpriseAuthId",
table: "Enterprise",
column: "EnterpriseAuthId",
principalTable: "EnterpriseAuth",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserInfo_DictionaryData_ProvinceId",
table: "UserInfo",
column: "ProvinceId",
principalTable: "DictionaryData",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_DictionaryData_CityId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_DictionaryData_IndustryTypeId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_DictionaryData_ProvinceId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_Enterprise_EnterpriseAuth_EnterpriseAuthId",
table: "Enterprise");
migrationBuilder.DropForeignKey(
name: "FK_UserInfo_DictionaryData_ProvinceId",
table: "UserInfo");
migrationBuilder.DropTable(
name: "EnterpriseAuth");
migrationBuilder.DropIndex(
name: "IX_UserInfo_ProvinceId",
table: "UserInfo");
migrationBuilder.DropIndex(
name: "IX_Enterprise_CityId",
table: "Enterprise");
migrationBuilder.DropIndex(
name: "IX_Enterprise_EnterpriseAuthId",
table: "Enterprise");
migrationBuilder.DropIndex(
name: "IX_Enterprise_IndustryTypeId",
table: "Enterprise");
migrationBuilder.DropIndex(
name: "IX_Enterprise_ProvinceId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "Img",
table: "UserInfoPhoto");
migrationBuilder.DropColumn(
name: "BackImg",
table: "UserInfoCredential");
migrationBuilder.DropColumn(
name: "Img",
table: "UserInfoCredential");
migrationBuilder.DropColumn(
name: "Avatar",
table: "UserInfo");
migrationBuilder.DropColumn(
name: "ProvinceId",
table: "UserInfo");
migrationBuilder.DropColumn(
name: "BankCardImg",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "IdentityBackImg",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "IdentityImg",
table: "UserAuth");
migrationBuilder.DropColumn(
name: "BankBranchName",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "BankName",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "CityId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ContactEmail",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ContactPhoneNumber",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "EnterpriseAuthId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "IndustryTypeId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "IsCheckedBankCard",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "MainBusiness",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "MergeSignCost",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "PayAccess",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "ProvinceId",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "RealVerifyCost",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "SignCost",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "SmsAccess",
table: "Enterprise");
migrationBuilder.DropColumn(
name: "SmsCost",
table: "Enterprise");
migrationBuilder.AddColumn(
name: "ImgId",
table: "UserInfoPhoto",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "照片Id");
migrationBuilder.AddColumn(
name: "BackImgId",
table: "UserInfoCredential",
type: "uniqueidentifier",
nullable: true,
comment: "证书反面照片Id");
migrationBuilder.AddColumn(
name: "ImgId",
table: "UserInfoCredential",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
comment: "证书正面照片Id");
migrationBuilder.AddColumn(
name: "AvatarId",
table: "UserAuth",
type: "uniqueidentifier",
nullable: true,
comment: "头像Id");
migrationBuilder.AddColumn(
name: "BankCardImgId",
table: "UserAuth",
type: "uniqueidentifier",
nullable: true,
comment: "银行卡照片Id");
migrationBuilder.AddColumn(
name: "IdentityBackImgId",
table: "UserAuth",
type: "uniqueidentifier",
nullable: true,
comment: "身份证国徽面Id");
migrationBuilder.AddColumn(
name: "IdentityImgId",
table: "UserAuth",
type: "uniqueidentifier",
nullable: true,
comment: "身份证人像面Id");
migrationBuilder.AddColumn(
name: "BankCardImgId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true,
comment: "法人或经办人银行卡照片Id");
migrationBuilder.AddColumn(
name: "ContactNumber",
table: "Enterprise",
type: "nvarchar(11)",
maxLength: 11,
nullable: true,
comment: "联系电话");
migrationBuilder.AddColumn(
name: "EnterpriseName",
table: "Enterprise",
type: "nvarchar(128)",
maxLength: 128,
nullable: false,
defaultValue: "",
comment: "企业全称");
migrationBuilder.AddColumn(
name: "EnterpriseRealMethod",
table: "Enterprise",
type: "int",
nullable: true,
comment: "企业认证方式");
migrationBuilder.AddColumn(
name: "Identity",
table: "Enterprise",
type: "nvarchar(18)",
maxLength: 18,
nullable: true,
comment: "法人或经办人身份证号");
migrationBuilder.AddColumn(
name: "IdentityBackImgId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true,
comment: "法人或经办人身份证国徽面Id");
migrationBuilder.AddColumn(
name: "IdentityImgId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true,
comment: "法人或经办人身份证人像面Id");
migrationBuilder.AddColumn(
name: "IsReal",
table: "Enterprise",
type: "bit",
nullable: false,
defaultValue: false,
comment: "是否实名");
migrationBuilder.AddColumn(
name: "LegalPerson",
table: "Enterprise",
type: "nvarchar(32)",
maxLength: 32,
nullable: true,
comment: "法人姓名");
migrationBuilder.AddColumn(
name: "LicenseImageId",
table: "Enterprise",
type: "uniqueidentifier",
nullable: true,
comment: "营业执照照片Id");
migrationBuilder.AddColumn(
name: "Name",
table: "Enterprise",
type: "nvarchar(32)",
maxLength: 32,
nullable: true,
comment: "法人或经办人姓名");
migrationBuilder.AddColumn(
name: "PersonalRealMethod",
table: "Enterprise",
type: "int",
nullable: true,
comment: "法人或经办人实名方式");
migrationBuilder.AddColumn(
name: "PhoneNumber",
table: "Enterprise",
type: "nvarchar(11)",
maxLength: 11,
nullable: true,
comment: "法人或经办人手机号");
migrationBuilder.AddColumn(
name: "Proxy",
table: "Enterprise",
type: "bit",
nullable: true,
comment: "是否委托经办人");
migrationBuilder.AddColumn(
name: "ProxyPowerAttorneyUrl",
table: "Enterprise",
type: "nvarchar(max)",
nullable: true,
comment: "企业授权书");
migrationBuilder.AddColumn(
name: "SocietyCreditCode",
table: "Enterprise",
type: "nvarchar(18)",
maxLength: 18,
nullable: false,
defaultValue: "",
comment: "统一社会信用代码");
migrationBuilder.CreateTable(
name: "FileStore",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
AbsolutePath = table.Column(type: "nvarchar(max)", nullable: false, comment: "绝对路径"),
Access = table.Column(type: "int", nullable: false, comment: "通道"),
ContentType = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false, comment: "内容类型"),
CreatedTime = table.Column(type: "datetimeoffset", nullable: false),
CreatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "创建操作人"),
Extension = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false, comment: "扩展名"),
FileType = table.Column(type: "int", nullable: false, comment: "文件类型"),
Hash = table.Column(type: "nvarchar(max)", nullable: false, comment: "哈希"),
ImageHeight = table.Column(type: "int", nullable: true, comment: "高度(像素)"),
ImageWidth = table.Column(type: "int", nullable: true, comment: "宽度(像素)"),
IsDeleted = table.Column(type: "bit", nullable: false, comment: "是否删除"),
Length = table.Column(type: "bigint", nullable: false, comment: "文件大小(字节)"),
Name = table.Column(type: "nvarchar(max)", nullable: false, comment: "名称"),
RelativePath = table.Column(type: "nvarchar(max)", nullable: true, comment: "相对路径"),
Sort = table.Column(type: "int", nullable: false, comment: "排序"),
TraceId = table.Column(type: "nvarchar(max)", nullable: true, comment: "跟踪Id"),
UpdatedTime = table.Column(type: "datetimeoffset", nullable: true),
UpdatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "最后更新操作人")
},
constraints: table =>
{
table.PrimaryKey("PK_FileStore", x => x.Id);
},
comment: "文件存储");
migrationBuilder.CreateTable(
name: "FileVirtualPath",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
StoreId = table.Column(type: "uniqueidentifier", nullable: false, comment: "文件存储Id"),
CreatedTime = table.Column(type: "datetimeoffset", nullable: false),
CreatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "创建操作人"),
IsDeleted = table.Column(type: "bit", nullable: false, comment: "是否删除"),
Name = table.Column(type: "nvarchar(max)", nullable: false, comment: "名称"),
Sort = table.Column(type: "int", nullable: false, comment: "排序"),
TraceId = table.Column(type: "nvarchar(max)", nullable: true, comment: "跟踪Id"),
UpdatedTime = table.Column(type: "datetimeoffset", nullable: true),
UpdatedUserInfoId = table.Column(type: "uniqueidentifier", nullable: true, comment: "最后更新操作人"),
VirtualPath = table.Column(type: "nvarchar(max)", nullable: false, comment: "虚拟路径")
},
constraints: table =>
{
table.PrimaryKey("PK_FileVirtualPath", x => x.Id);
table.ForeignKey(
name: "FK_FileVirtualPath_FileStore_StoreId",
column: x => x.StoreId,
principalTable: "FileStore",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "文件虚拟路径");
migrationBuilder.UpdateData(
table: "UserAuth",
keyColumn: "Id",
keyValue: new Guid("11111111-1111-1111-1111-111111111111"),
columns: new[] { "AvatarId", "BankCardImgId", "IdentityBackImgId", "IdentityImgId" },
values: new object[] { null, null, null, null });
migrationBuilder.CreateIndex(
name: "IX_UserInfoPhoto_ImgId",
table: "UserInfoPhoto",
column: "ImgId");
migrationBuilder.CreateIndex(
name: "IX_UserInfoCredential_BackImgId",
table: "UserInfoCredential",
column: "BackImgId");
migrationBuilder.CreateIndex(
name: "IX_UserInfoCredential_ImgId",
table: "UserInfoCredential",
column: "ImgId");
migrationBuilder.CreateIndex(
name: "IX_UserAuth_AvatarId",
table: "UserAuth",
column: "AvatarId");
migrationBuilder.CreateIndex(
name: "IX_UserAuth_BankCardImgId",
table: "UserAuth",
column: "BankCardImgId");
migrationBuilder.CreateIndex(
name: "IX_UserAuth_IdentityBackImgId",
table: "UserAuth",
column: "IdentityBackImgId");
migrationBuilder.CreateIndex(
name: "IX_UserAuth_IdentityImgId",
table: "UserAuth",
column: "IdentityImgId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_IdentityBackImgId",
table: "Enterprise",
column: "IdentityBackImgId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_IdentityImgId",
table: "Enterprise",
column: "IdentityImgId");
migrationBuilder.CreateIndex(
name: "IX_Enterprise_LicenseImageId",
table: "Enterprise",
column: "LicenseImageId");
migrationBuilder.CreateIndex(
name: "IX_FileVirtualPath_StoreId",
table: "FileVirtualPath",
column: "StoreId");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_FileVirtualPath_IdentityBackImgId",
table: "Enterprise",
column: "IdentityBackImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_FileVirtualPath_IdentityImgId",
table: "Enterprise",
column: "IdentityImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Enterprise_FileVirtualPath_LicenseImageId",
table: "Enterprise",
column: "LicenseImageId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserAuth_FileVirtualPath_AvatarId",
table: "UserAuth",
column: "AvatarId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserAuth_FileVirtualPath_BankCardImgId",
table: "UserAuth",
column: "BankCardImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserAuth_FileVirtualPath_IdentityBackImgId",
table: "UserAuth",
column: "IdentityBackImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserAuth_FileVirtualPath_IdentityImgId",
table: "UserAuth",
column: "IdentityImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserInfoCredential_FileVirtualPath_BackImgId",
table: "UserInfoCredential",
column: "BackImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_UserInfoCredential_FileVirtualPath_ImgId",
table: "UserInfoCredential",
column: "ImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserInfoPhoto_FileVirtualPath_ImgId",
table: "UserInfoPhoto",
column: "ImgId",
principalTable: "FileVirtualPath",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}