migration & update-databse to contractingParty (new prop)

This commit is contained in:
SamSys
2025-03-16 16:45:12 +03:30
parent 5b3b073223
commit f105e21ef7
5 changed files with 8932 additions and 2 deletions

View File

@@ -31,6 +31,16 @@ public class PersonalContractingpartyMapping : IEntityTypeConfiguration<Personal
builder.Property(x => x.IsBlock).HasMaxLength(5);
builder.Property(x => x.BlockTimes);
#region NewProp
builder.Property(x => x.IdNumberSeri).HasMaxLength(5);
builder.Property(x => x.IdNumberSerial).HasMaxLength(15);
builder.Property(x => x.FatherName).HasMaxLength(20);
builder.Property(x => x.DateOfBirth).IsRequired(false);
#endregion

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,73 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompanyManagment.EFCore.Migrations
{
/// <inheritdoc />
public partial class addNewPropToContractingParty : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "DateOfBirth",
table: "PersonalContractingParties",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "FatherName",
table: "PersonalContractingParties",
type: "nvarchar(20)",
maxLength: 20,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "IdNumberSeri",
table: "PersonalContractingParties",
type: "nvarchar(5)",
maxLength: 5,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "IdNumberSerial",
table: "PersonalContractingParties",
type: "nvarchar(15)",
maxLength: 15,
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsAuthenticated",
table: "PersonalContractingParties",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DateOfBirth",
table: "PersonalContractingParties");
migrationBuilder.DropColumn(
name: "FatherName",
table: "PersonalContractingParties");
migrationBuilder.DropColumn(
name: "IdNumberSeri",
table: "PersonalContractingParties");
migrationBuilder.DropColumn(
name: "IdNumberSerial",
table: "PersonalContractingParties");
migrationBuilder.DropColumn(
name: "IsAuthenticated",
table: "PersonalContractingParties");
}
}
}

View File

@@ -558,19 +558,37 @@ namespace CompanyManagment.EFCore.Migrations
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateOfBirth")
.HasColumnType("datetime2");
b.Property<string>("FName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("FatherName")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("IdNumber")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)");
b.Property<string>("IdNumberSeri")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<string>("IdNumberSerial")
.HasMaxLength(15)
.HasColumnType("nvarchar(15)");
b.Property<string>("IsActiveString")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property<bool>("IsAuthenticated")
.HasColumnType("bit");
b.Property<string>("IsBlock")
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");

View File

@@ -12,10 +12,10 @@
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
//server
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
//local
"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
"MesbahDb": "Data Source=.;Initial Catalog=mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
},
"GoogleRecaptchaV3": {
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",