Fixes CompanyMaster migration issue
This commit is contained in:
parent
97e651b2ae
commit
b9d9b3eaa4
@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BCS.BMC.Migrations
|
||||
{
|
||||
public partial class CompanyMaster : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TopLevelDomainName",
|
||||
table: "CompanyMaster",
|
||||
newName: "Url");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Url",
|
||||
table: "CompanyMaster",
|
||||
newName: "TopLevelDomainName");
|
||||
}
|
||||
}
|
||||
}
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace BCS.BMC.Migrations
|
||||
{
|
||||
[DbContext(typeof(BMCDbContext))]
|
||||
[Migration("20220909103348_CompanyMaster")]
|
||||
partial class CompanyMaster
|
||||
[Migration("20221011111318_CompanyMasters")]
|
||||
partial class CompanyMasters
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BCS.BMC.Migrations
|
||||
{
|
||||
public partial class CompanyMasters : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CompanyMaster",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CompanyName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DomainName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SubDomainName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorUserId = table.Column<long>(type: "bigint", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierUserId = table.Column<long>(type: "bigint", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false),
|
||||
DeleterUserId = table.Column<long>(type: "bigint", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CompanyMaster", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CompanyMaster");
|
||||
}
|
||||
}
|
||||
}
|
@ -91,10 +91,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var companydetails = _$form.serializeFormToObject();
|
||||
|
||||
|
||||
abp.ui.setBusy(_$modal);
|
||||
_companyService.createOrUpdateCompanyMaster(user).done(function () {
|
||||
_companyService.createOrUpdateCompanyMaster(companydetails).done(function () {
|
||||
_$modal.modal('hide');
|
||||
_$form[0].reset();
|
||||
abp.notify.info(l('SavedSuccessfully'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user