Generator Changes at 10/13/2025 8:08:52 AM

This commit is contained in:
MeysamMoghaddam
2025-10-13 08:19:47 +03:30
parent afad9b62be
commit f7da86ec02
41 changed files with 869 additions and 5 deletions

View File

@@ -0,0 +1,109 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class u04 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "BirthDate",
schema: "CMS",
table: "Users",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "EmailNotifications",
schema: "CMS",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "PushNotifications",
schema: "CMS",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "SmsNotifications",
schema: "CMS",
table: "Users",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<long>(
name: "UserAddressId",
schema: "CMS",
table: "UserOrders",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.CreateIndex(
name: "IX_UserOrders_UserAddressId",
schema: "CMS",
table: "UserOrders",
column: "UserAddressId");
migrationBuilder.AddForeignKey(
name: "FK_UserOrders_UserAddresss_UserAddressId",
schema: "CMS",
table: "UserOrders",
column: "UserAddressId",
principalSchema: "CMS",
principalTable: "UserAddresss",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_UserOrders_UserAddresss_UserAddressId",
schema: "CMS",
table: "UserOrders");
migrationBuilder.DropIndex(
name: "IX_UserOrders_UserAddressId",
schema: "CMS",
table: "UserOrders");
migrationBuilder.DropColumn(
name: "BirthDate",
schema: "CMS",
table: "Users");
migrationBuilder.DropColumn(
name: "EmailNotifications",
schema: "CMS",
table: "Users");
migrationBuilder.DropColumn(
name: "PushNotifications",
schema: "CMS",
table: "Users");
migrationBuilder.DropColumn(
name: "SmsNotifications",
schema: "CMS",
table: "Users");
migrationBuilder.DropColumn(
name: "UserAddressId",
schema: "CMS",
table: "UserOrders");
}
}
}