marco.pms.api/Marco.Pms.DataAccess/Migrations/20250519053019_Fixed_Typo_Of_ColumnName.cs

65 lines
2.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Fixed_Typo_Of_ColumnName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings");
migrationBuilder.AlterColumn<Guid>(
name: "ContactTagId",
table: "ContactTagMappings",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true)
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings",
column: "ContactTagId",
principalTable: "ContactTagMasters",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings");
migrationBuilder.AlterColumn<Guid>(
name: "ContactTagId",
table: "ContactTagMappings",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings",
column: "ContactTagId",
principalTable: "ContactTagMasters",
principalColumn: "Id");
}
}
}