DB issue fix

This commit is contained in:
2026-08-04 11:27:39 +05:30
parent 4f56d481a2
commit c6bc8065a2
12 changed files with 1245 additions and 15344 deletions
File diff suppressed because it is too large Load Diff
@@ -1,22 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ERPCore.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,23 +0,0 @@
// <auto-generated />
using ERPCore.Infra.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ERPCore.Migrations
{
[DbContext(typeof(ErpDbContext))]
[Migration("20260801000000_AddCompanyProfile")]
partial class AddCompanyProfile
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
// This designer is kept minimal because the repo does not regenerate migrations here.
// EF tooling only needs the migration metadata to exist; the active model snapshot
// is updated separately.
}
}
}
@@ -1,60 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ERPCore.Migrations
{
/// <inheritdoc />
public partial class AddCompanyProfile : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "company_profile",
columns: table => new
{
CompanyProfileId = table.Column<int>(type: "integer", nullable: false),
LegalName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
TradeName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
LogoUrl = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
TaxRegistrationNo = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
VatRegistrationNo = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
AddressLine1 = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
AddressLine2 = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
City = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
Country = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
Phone = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
Email = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
BankName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
BankBranch = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
AccountName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
AccountNumber = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
SwiftCode = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true),
FooterNote = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
UpdatedBy = table.Column<int>(type: "integer", nullable: true),
xmin = table.Column<uint>(type: "xid", rowVersion: true, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_company_profile", x => x.CompanyProfileId);
table.CheckConstraint("ck_company_profile_singleton", "\"CompanyProfileId\" = 1");
table.ForeignKey(
name: "FK_company_profile_users_UpdatedBy",
column: x => x.UpdatedBy,
principalTable: "users",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "company_profile");
}
}
}
File diff suppressed because it is too large Load Diff