67 changed files with 11340 additions and 380278 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,32 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations; |
|
||||
|
|
||||
public partial class ItemSafetyStockModifyIndexToUnique : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_ItemSafetyStock_ItemCode_Company_StoreRelationType_StoreValue", |
|
||||
table: "Basedata_ItemSafetyStock"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ItemSafetyStock_ItemCode_Company_WarehouseCode_StoreRelationType_StoreValue", |
|
||||
table: "Basedata_ItemSafetyStock", |
|
||||
columns: new[] { "ItemCode", "Company", "WarehouseCode", "StoreRelationType", "StoreValue" }, |
|
||||
unique: true, |
|
||||
filter: "[StoreValue] IS NOT NULL"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_ItemSafetyStock_ItemCode_Company_WarehouseCode_StoreRelationType_StoreValue", |
|
||||
table: "Basedata_ItemSafetyStock"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ItemSafetyStock_ItemCode_Company_StoreRelationType_StoreValue", |
|
||||
table: "Basedata_ItemSafetyStock", |
|
||||
columns: new[] { "ItemCode", "Company", "StoreRelationType", "StoreValue" }); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,105 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations; |
|
||||
|
|
||||
public partial class Modify20230103 : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_Basedata_Machine_Basedata_ProductionLine_ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.DropForeignKey( |
|
||||
name: "FK_Basedata_Machine_Basedata_WorkStation_WorkStationId", |
|
||||
table: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_Machine_ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_Machine_WorkStationId", |
|
||||
table: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_ItemCategory_Company_CategoryCode_ItemCode_Value", |
|
||||
table: "Basedata_ItemCategory"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ItemTypes", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ItemCategory_Company_CategoryCode_ItemCode", |
|
||||
table: "Basedata_ItemCategory", |
|
||||
columns: new[] { "Company", "CategoryCode", "ItemCode" }, |
|
||||
unique: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_ItemCategory_Company_CategoryCode_ItemCode", |
|
||||
table: "Basedata_ItemCategory"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ItemTypes", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<Guid>( |
|
||||
name: "ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine", |
|
||||
type: "uniqueidentifier", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Machine_ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine", |
|
||||
column: "ProdLineAggregateRootId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Machine_WorkStationId", |
|
||||
table: "Basedata_Machine", |
|
||||
column: "WorkStationId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ItemCategory_Company_CategoryCode_ItemCode_Value", |
|
||||
table: "Basedata_ItemCategory", |
|
||||
columns: new[] { "Company", "CategoryCode", "ItemCode", "Value" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_Basedata_Machine_Basedata_ProductionLine_ProdLineAggregateRootId", |
|
||||
table: "Basedata_Machine", |
|
||||
column: "ProdLineAggregateRootId", |
|
||||
principalTable: "Basedata_ProductionLine", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Restrict); |
|
||||
|
|
||||
migrationBuilder.AddForeignKey( |
|
||||
name: "FK_Basedata_Machine_Basedata_WorkStation_WorkStationId", |
|
||||
table: "Basedata_Machine", |
|
||||
column: "WorkStationId", |
|
||||
principalTable: "Basedata_WorkStation", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,909 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations; |
|
||||
|
|
||||
public partial class FlatUomQtyPackingInfoAndTimeRange : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_Calendar_Module", |
|
||||
table: "Basedata_Calendar"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierPackQty_Qty", |
|
||||
table: "Basedata_SupplierItem"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ConversionRate", |
|
||||
table: "Basedata_ItemPack"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "IsStdPack", |
|
||||
table: "Basedata_ItemPack"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "PackQty_Uom", |
|
||||
table: "Basedata_ItemPack"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CustomerPackQty_Qty", |
|
||||
table: "Basedata_CustomerItem"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "PerQty_Qty", |
|
||||
table: "Basedata_Bom"); |
|
||||
|
|
||||
migrationBuilder.EnsureSchema( |
|
||||
name: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkStation", |
|
||||
newName: "Basedata_WorkStation", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkShop", |
|
||||
newName: "Basedata_WorkShop", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkGroup", |
|
||||
newName: "Basedata_WorkGroup", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Warehouse", |
|
||||
newName: "Basedata_Warehouse", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Uom", |
|
||||
newName: "Basedata_Uom", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_TransactionType", |
|
||||
newName: "Basedata_TransactionType", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Team", |
|
||||
newName: "Basedata_Team", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SupplierTime", |
|
||||
newName: "Basedata_SupplierTime", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SupplierItem", |
|
||||
newName: "Basedata_SupplierItem", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Supplier", |
|
||||
newName: "Basedata_Supplier", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_StrategyRule", |
|
||||
newName: "Basedata_StrategyRule", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Strategy", |
|
||||
newName: "Basedata_Strategy", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_StdCostPriceSheet", |
|
||||
newName: "Basedata_StdCostPriceSheet", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Shift", |
|
||||
newName: "Basedata_Shift", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SalePriceSheet", |
|
||||
newName: "Basedata_SalePriceSheet", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Rule", |
|
||||
newName: "Basedata_Rule", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Route", |
|
||||
newName: "Basedata_Route", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_PurchasePriceSheet", |
|
||||
newName: "Basedata_PurchasePriceSheet", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Project", |
|
||||
newName: "Basedata_Project", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ProductionLine", |
|
||||
newName: "Basedata_ProductionLine", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ProdLineItem", |
|
||||
newName: "Basedata_ProdLineItem", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Param", |
|
||||
newName: "Basedata_Param", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Machine", |
|
||||
newName: "Basedata_Machine", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_LocationGroup", |
|
||||
newName: "Basedata_LocationGroup", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Location", |
|
||||
newName: "Basedata_Location", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemStoreRelation", |
|
||||
newName: "Basedata_ItemStoreRelation", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemSafetyStock", |
|
||||
newName: "Basedata_ItemSafetyStock", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemQuality", |
|
||||
newName: "Basedata_ItemQuality", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemPack", |
|
||||
newName: "Basedata_ItemPack", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemGuideBook", |
|
||||
newName: "Basedata_ItemGuideBook", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemCategory", |
|
||||
newName: "Basedata_ItemCategory", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemBasic", |
|
||||
newName: "Basedata_ItemBasic", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_InventoryRoute", |
|
||||
newName: "Basedata_InventoryRoute", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_InterfaceCalendar", |
|
||||
newName: "Basedata_InterfaceCalendar", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ErpLocation", |
|
||||
newName: "Basedata_ErpLocation", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_DocumentSetting", |
|
||||
newName: "Basedata_DocumentSetting", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Dock", |
|
||||
newName: "Basedata_Dock", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_DictItem", |
|
||||
newName: "Basedata_DictItem", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Dict", |
|
||||
newName: "Basedata_Dict", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerItem", |
|
||||
newName: "Basedata_CustomerItem", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerBom", |
|
||||
newName: "Basedata_CustomerBom", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerAddress", |
|
||||
newName: "Basedata_CustomerAddress", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Customer", |
|
||||
newName: "Basedata_Customer", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CurrencyExchange", |
|
||||
newName: "Basedata_CurrencyExchange", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Currency", |
|
||||
newName: "Basedata_Currency", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Configuration", |
|
||||
newName: "Basedata_Configuration", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Category", |
|
||||
newName: "Basedata_Category", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Calendar", |
|
||||
newName: "Basedata_Calendar", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Bom", |
|
||||
newName: "Basedata_Bom", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_AreaItem", |
|
||||
newName: "Basedata_AreaItem", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Area", |
|
||||
newName: "Basedata_Area", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_AQL", |
|
||||
newName: "Basedata_AQL", |
|
||||
newSchema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "SupplierPackQty_Uom", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_SupplierItem", |
|
||||
newName: "SupplierPackUom"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Shift", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Shift", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Project", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Project", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "PackQty_Qty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemPack", |
|
||||
newName: "Qty"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "StdPackCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemPack", |
|
||||
newName: "BasicUom"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "CustomerPackQty_Uom", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "CustomerPackUom"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "PerQty_Uom", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "ComponentUom"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "SupplierPackQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_SupplierItem", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<decimal>( |
|
||||
name: "Qty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemPack", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: false, |
|
||||
defaultValue: 0m, |
|
||||
oldClrType: typeof(decimal), |
|
||||
oldType: "decimal(18,6)", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "CustomerPackQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Module", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "EndTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "datetime2", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "BeginTime", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "datetime2", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "ComponentQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Calendar_Module", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
column: "Module", |
|
||||
unique: true, |
|
||||
filter: "[Module] IS NOT NULL"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropIndex( |
|
||||
name: "IX_Basedata_Calendar_Module", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierPackQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_SupplierItem"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CustomerPackQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerItem"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ComponentQty", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkStation", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_WorkStation"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkShop", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_WorkShop"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_WorkGroup", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_WorkGroup"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Warehouse", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Warehouse"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Uom", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Uom"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_TransactionType", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_TransactionType"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Team", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Team"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SupplierTime", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_SupplierTime"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SupplierItem", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_SupplierItem"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Supplier", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Supplier"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_StrategyRule", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_StrategyRule"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Strategy", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Strategy"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_StdCostPriceSheet", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_StdCostPriceSheet"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Shift", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Shift"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_SalePriceSheet", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_SalePriceSheet"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Rule", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Rule"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Route", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Route"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_PurchasePriceSheet", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_PurchasePriceSheet"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Project", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Project"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ProductionLine", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ProductionLine"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ProdLineItem", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ProdLineItem"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Param", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Param"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Machine", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Machine"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_LocationGroup", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_LocationGroup"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Location", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Location"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemStoreRelation", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemStoreRelation"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemSafetyStock", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemSafetyStock"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemQuality", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemQuality"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemPack", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemPack"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemGuideBook", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemGuideBook"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemCategory", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemCategory"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ItemBasic", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ItemBasic"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_InventoryRoute", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_InventoryRoute"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_InterfaceCalendar", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_InterfaceCalendar"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_ErpLocation", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_ErpLocation"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_DocumentSetting", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_DocumentSetting"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Dock", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Dock"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_DictItem", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_DictItem"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Dict", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Dict"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerItem", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_CustomerItem"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerBom", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_CustomerBom"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CustomerAddress", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_CustomerAddress"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Customer", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Customer"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_CurrencyExchange", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_CurrencyExchange"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Currency", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Currency"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Configuration", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Configuration"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Category", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Category"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Calendar", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Calendar"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Bom", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Bom"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_AreaItem", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_AreaItem"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_Area", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_Area"); |
|
||||
|
|
||||
migrationBuilder.RenameTable( |
|
||||
name: "Basedata_AQL", |
|
||||
schema: "dbo", |
|
||||
newName: "Basedata_AQL"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "SupplierPackUom", |
|
||||
table: "Basedata_SupplierItem", |
|
||||
newName: "SupplierPackQty_Uom"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Basedata_Shift", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Basedata_Shift", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Basedata_Project", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Basedata_Project", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Qty", |
|
||||
table: "Basedata_ItemPack", |
|
||||
newName: "PackQty_Qty"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BasicUom", |
|
||||
table: "Basedata_ItemPack", |
|
||||
newName: "StdPackCode"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "CustomerPackUom", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
newName: "CustomerPackQty_Uom"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Basedata_Calendar", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Basedata_Calendar", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ComponentUom", |
|
||||
table: "Basedata_Bom", |
|
||||
newName: "PerQty_Uom"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "SupplierPackQty_Qty", |
|
||||
table: "Basedata_SupplierItem", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<decimal>( |
|
||||
name: "PackQty_Qty", |
|
||||
table: "Basedata_ItemPack", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(decimal), |
|
||||
oldType: "decimal(18,6)"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "ConversionRate", |
|
||||
table: "Basedata_ItemPack", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<bool>( |
|
||||
name: "IsStdPack", |
|
||||
table: "Basedata_ItemPack", |
|
||||
type: "bit", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: false); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "PackQty_Uom", |
|
||||
table: "Basedata_ItemPack", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "CustomerPackQty_Qty", |
|
||||
table: "Basedata_CustomerItem", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Module", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "TimeRange_EndTime", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "datetime2", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "datetime2", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "PerQty_Qty", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Calendar_Module", |
|
||||
table: "Basedata_Calendar", |
|
||||
column: "Module", |
|
||||
unique: true); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,62 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations; |
|
||||
|
|
||||
public partial class FlatLocation : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RawLocation", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
newName: "RawLocationCode"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ProductLocation", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
newName: "ProductLocationCode"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RawLocation", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
newName: "RawLocationCode"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ProductLocation", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
newName: "ProductLocationCode"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RawLocationCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
newName: "RawLocation"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ProductLocationCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
newName: "ProductLocation"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RawLocationCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
newName: "RawLocation"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ProductLocationCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
newName: "ProductLocation"); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,468 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations; |
|
||||
|
|
||||
public partial class RemoveUseless : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_AreaItem", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_Configuration", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_CustomerBom", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_InventoryRoute", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_Param", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_ProdLineItem", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_Route", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_Rule", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_Strategy", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_StrategyRule", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_SupplierTime", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_ProductionLineItem", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ProdLineCode = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|
||||
ItemCode = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_ProductionLineItem", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_SupplierTimeWindow", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
SupplierName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
TimeSlot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Week = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_SupplierTimeWindow", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLineItem", |
|
||||
columns: new[] { "ProdLineCode", "ItemCode" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_SupplierTimeWindow", |
|
||||
columns: new[] { "SupplierCode", "TimeSlot", "Week" }, |
|
||||
unique: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_ProductionLineItem", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Basedata_SupplierTimeWindow", |
|
||||
schema: "dbo"); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_AreaItem", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Allowed = table.Column<bool>(type: "bit", nullable: false), |
|
||||
AreaId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ItemId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
UomId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_AreaItem", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_Configuration", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
Key = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Value = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_Configuration", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_CustomerBom", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ChildItemId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
CustomerId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false), |
|
||||
EffectiveTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
FailureTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ParentItemId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 64, nullable: false), |
|
||||
Qty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_CustomerBom", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_InventoryRoute", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_InventoryRoute", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_Param", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true), |
|
||||
Enabled = table.Column<bool>(type: "bit", nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
Group = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Value = table.Column<string>(type: "nvarchar(max)", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_Param", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_ProdLineItem", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ItemCode = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ProdLineCode = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_ProdLineItem", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_Route", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_Route", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_Rule", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Value = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_Rule", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_Strategy", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Code = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Description = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Type = table.Column<int>(type: "int", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_Strategy", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_StrategyRule", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
EffectiveTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ExpireTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
RuleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Seq = table.Column<int>(type: "int", nullable: false), |
|
||||
StrategyId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_StrategyRule", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Basedata_SupplierTime", |
|
||||
schema: "dbo", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
SupplierCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
SupplierName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
TimeSlot = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Week = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Basedata_SupplierTime", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_AreaItem_AreaId_ItemId", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_AreaItem", |
|
||||
columns: new[] { "AreaId", "ItemId" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Configuration_Key", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Configuration", |
|
||||
column: "Key", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_CustomerBom_CustomerId_ParentItemId_ChildItemId", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_CustomerBom", |
|
||||
columns: new[] { "CustomerId", "ParentItemId", "ChildItemId" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_InventoryRoute_Code", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_InventoryRoute", |
|
||||
column: "Code", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Param_Code", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Param", |
|
||||
column: "Code", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_ProdLineItem_ProdLineCode_ItemCode", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProdLineItem", |
|
||||
columns: new[] { "ProdLineCode", "ItemCode" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Route_Code", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Route", |
|
||||
column: "Code", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Rule_Code", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Rule", |
|
||||
column: "Code", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_Strategy_Code", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Strategy", |
|
||||
column: "Code", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_StrategyRule_StrategyId_RuleId", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_StrategyRule", |
|
||||
columns: new[] { "StrategyId", "RuleId" }, |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Basedata_SupplierTime_SupplierCode_TimeSlot_Week", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_SupplierTime", |
|
||||
columns: new[] { "SupplierCode", "TimeSlot", "Week" }, |
|
||||
unique: true); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,883 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations |
|
||||
{ |
|
||||
public partial class EnumToString : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProductLine", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Item_Name", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Item_Desc2", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Desc2"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Item_Desc1", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Desc1"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkGroup", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Uom", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Uom", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "TransType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "TransSubType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Supplier", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Project", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "GroupType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "DefaultInventoryStatus", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "DefaultInventoryStatus", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "StoreRelationType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemStoreRelation", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "PramaryUM", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemStoreRelation", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "StoreRelationType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemSafetyStock", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "Open", |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int", |
|
||||
oldDefaultValue: 1); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "InspectType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Name", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Desc2", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Desc1", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ValidityUnit", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ManageType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ErpLocation", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Dock", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Customer", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ShortName", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Customer", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Category", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "TruncType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "PlannedSplitRule", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "DistributionType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Area", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldMaxLength: 4096, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "AreaType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Area", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(int), |
|
||||
oldType: "int"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Name", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Item_Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Desc2", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Item_Desc2"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Desc1", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
newName: "Item_Desc1"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkStation", |
|
||||
type: "int", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_WorkGroup", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Uom", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Uom", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "TransType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "TransSubType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_TransactionType", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Supplier", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Project", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ProductionLine", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "GroupType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "DefaultInventoryStatus", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_LocationGroup", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "DefaultInventoryStatus", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Location", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "StoreRelationType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemStoreRelation", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "PramaryUM", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemStoreRelation", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "StoreRelationType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemSafetyStock", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 1, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "Open"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "InspectType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Item_Name", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Item_Desc2", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Item_Desc1", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemGuideBook", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(max)", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "ValidityUnit", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "ManageType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProductLine", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemBasic", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ErpLocation", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Dock", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Type", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Customer", |
|
||||
type: "int", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ShortName", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Customer", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Category", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Calendar", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "TruncType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "PlannedSplitRule", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "DistributionType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Bom", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Description", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Area", |
|
||||
type: "nvarchar(max)", |
|
||||
maxLength: 4096, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(1024)", |
|
||||
oldMaxLength: 1024, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<int>( |
|
||||
name: "AreaType", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_Area", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
} |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,39 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Basedata.Migrations |
|
||||
{ |
|
||||
public partial class BasedataEnumToString : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "Open"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Status", |
|
||||
schema: "dbo", |
|
||||
table: "Basedata_ItemQuality", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "Open", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
} |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,23 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Newtonsoft.Json; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Commons; |
||||
|
public sealed class CommonHelper |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 克隆对象
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <param name="sourceObj"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static T CloneObj<T>(T sourceObj) |
||||
|
{ |
||||
|
string json = JsonConvert.SerializeObject(sourceObj); |
||||
|
var ret = JsonConvert.DeserializeObject<T>(json); |
||||
|
return ret; |
||||
|
} |
||||
|
} |
@ -0,0 +1,368 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Linq; |
||||
|
using System.Reflection; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Commons; |
||||
|
public static class ExtMethod |
||||
|
{ |
||||
|
#region string
|
||||
|
public static int? TryToInt(this string p_str) |
||||
|
{ |
||||
|
int resu; |
||||
|
bool isSucc = int.TryParse(p_str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static int TryToIntZero(this string p_str) |
||||
|
{ |
||||
|
return p_str.TryToInt() ?? 0; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public static double? TryToDouble(this string p_str) |
||||
|
{ |
||||
|
double resu; |
||||
|
bool isSucc = double.TryParse(p_str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static double TryToDoubleZero(this string p_str) |
||||
|
{ |
||||
|
return p_str.TryToDouble() ?? 0; |
||||
|
} |
||||
|
|
||||
|
public static DateTime? TryToDateTime(this string p_str) |
||||
|
{ |
||||
|
if (p_str == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_str?.ToString(); |
||||
|
DateTime resu; |
||||
|
bool isSucc = DateTime.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static bool? TryToBool(this string p_str) |
||||
|
{ |
||||
|
if (p_str == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
bool ret; |
||||
|
bool isSucc = Boolean.TryParse(p_str, out ret); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return ret; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public static decimal? TryToDecimal(this string p_str) |
||||
|
{ |
||||
|
if (p_str == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
decimal ret; |
||||
|
bool isSucc = Decimal.TryParse(p_str, out ret); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return ret; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static decimal TryToDecimalZero(this string p_str) |
||||
|
{ |
||||
|
return p_str.TryToDecimal() ?? 0.0M; |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region object
|
||||
|
public static int? TryToInt(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
int resu; |
||||
|
bool isSucc = int.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static int TryToIntZero(this object p_obj) |
||||
|
{ |
||||
|
int? ret = TryToInt(p_obj); |
||||
|
return ret ?? 0; |
||||
|
} |
||||
|
|
||||
|
public static double? TryToDouble(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
double resu; |
||||
|
bool isSucc = double.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static double TryToDoubleZero(this object p_obj) |
||||
|
{ |
||||
|
return p_obj.TryToDouble() ?? 0; |
||||
|
} |
||||
|
|
||||
|
public static DateTime? TryToDateTime(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
DateTime resu; |
||||
|
bool isSucc = DateTime.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static DateTime TryToDateTime1900(this object p_obj) |
||||
|
{ |
||||
|
var ret = p_obj.TryToDateTime() ?? Convert.ToDateTime("1900-01-01"); |
||||
|
return ret; |
||||
|
} |
||||
|
public static bool? TryToBool(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
bool resu; |
||||
|
bool isSucc = Boolean.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static decimal? TryToDecimal(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
decimal ret; |
||||
|
bool isSucc = Decimal.TryParse(str, out ret); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return ret; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static decimal TryToDecimalZero(this object p_obj) |
||||
|
{ |
||||
|
return p_obj.TryToDecimal() ?? 0.0M; |
||||
|
} |
||||
|
#endregion
|
||||
|
|
||||
|
public static bool HasValue(this string p_str) |
||||
|
{ |
||||
|
return string.IsNullOrEmpty(p_str?.Trim()) ? false : true; |
||||
|
} |
||||
|
|
||||
|
public static bool IsNullOrEmpty2(this string p_str) |
||||
|
{ |
||||
|
return string.IsNullOrEmpty(p_str?.Trim()) ? true : false; |
||||
|
} |
||||
|
|
||||
|
public static string TryToEmptyIfNull(this string p_str) |
||||
|
{ |
||||
|
if (p_str == null) |
||||
|
{ |
||||
|
return string.Empty; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return p_str; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static string Left(this string str, int len) |
||||
|
{ |
||||
|
string result = str.Substring(0, len); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
public static string Right(this string str, int len) |
||||
|
{ |
||||
|
if (str.Length < len) |
||||
|
{ |
||||
|
return str; |
||||
|
} |
||||
|
string result = str.Substring(str.Length - len, len); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
public static object IntDBNull(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
int resu; |
||||
|
bool isSucc = int.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static object DoubleDBNull(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
double resu; |
||||
|
bool isSucc = double.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static object DateTimeDBNull(this object p_obj) |
||||
|
{ |
||||
|
if (p_obj == null) |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
string str = p_obj?.ToString(); |
||||
|
DateTime resu; |
||||
|
bool isSucc = DateTime.TryParse(str, out resu); |
||||
|
if (isSucc) |
||||
|
{ |
||||
|
return resu; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return DBNull.Value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 返回枚举项的描述信息。
|
||||
|
/// </summary>
|
||||
|
/// <param name="value">要获取描述信息的枚举项。</param>
|
||||
|
/// <returns>枚举想的描述信息。
|
||||
|
/// </returns>
|
||||
|
public static string GetDescription(this Enum value, bool isTop = false) |
||||
|
{ |
||||
|
Type enumType = value.GetType(); |
||||
|
DescriptionAttribute attr = null; |
||||
|
if (isTop) |
||||
|
{ |
||||
|
attr = (DescriptionAttribute)Attribute.GetCustomAttribute(enumType, typeof(DescriptionAttribute)); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// 获取枚举常数名称。
|
||||
|
string name = Enum.GetName(enumType, value); |
||||
|
if (name != null) |
||||
|
{ |
||||
|
// 获取枚举字段。
|
||||
|
FieldInfo fieldInfo = enumType.GetField(name); |
||||
|
if (fieldInfo != null) |
||||
|
{ |
||||
|
// 获取描述的属性。
|
||||
|
attr = Attribute.GetCustomAttribute(fieldInfo, typeof(DescriptionAttribute), false) as DescriptionAttribute; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if (attr != null && !string.IsNullOrEmpty(attr.Description)) |
||||
|
{ |
||||
|
return attr.Description; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return string.Empty; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,406 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations; |
|
||||
|
|
||||
public partial class RemoveWarehouseCodeInDetail : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_SupplierAsnDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ScrapRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_RecycledMaterialReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PutawayRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReturnRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleMaterialDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductL7PartsNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductionReturnRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_OfflineSettlementNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_JisProductReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ItemTransformRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ItemTransformNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InventoryInitialNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectAbnormalNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountAdjustRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountAdjustNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ContainerBindNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_BackFlushNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptRequestDetail"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_SupplierAsnDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ScrapRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_RecycledMaterialReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PutawayRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReturnRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductRecycleMaterialDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductReceiptRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductL7PartsNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ProductionReturnRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_OfflineSettlementNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_JisProductReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ItemTransformRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ItemTransformNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InventoryInitialNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectAbnormalNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountAdjustRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_CountAdjustNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_ContainerBindNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_BackFlushNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,167 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations; |
|
||||
|
|
||||
public partial class FlatTimeRangeAndPhoto : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_InspectAbnormalNoteDetailPhoto"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_InspectNoteDetailPhoto"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_ReceiptAbnormalNotePhoto"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_EndTime", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "TimeRange_BeginTime", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "BeginTime"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Photos", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Photos", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Photos", |
|
||||
table: "Store_InspectAbnormalNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "EndTime", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "datetime2", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "BeginTime", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "datetime2", |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Photos", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Photos", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Photos", |
|
||||
table: "Store_InspectAbnormalNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "EndTime", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "TimeRange_EndTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "BeginTime", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "TimeRange_BeginTime"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "EndTime", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "datetime2", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<DateTime>( |
|
||||
name: "BeginTime", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "datetime2", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|
||||
oldClrType: typeof(DateTime), |
|
||||
oldType: "datetime2", |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_InspectAbnormalNoteDetailPhoto", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
InspectAbnormalNoteDetailId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
PhotoID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_InspectAbnormalNoteDetailPhoto", x => new { x.InspectAbnormalNoteDetailId, x.PhotoID }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_Store_InspectAbnormalNoteDetailPhoto_Store_InspectAbnormalNoteDetail_InspectAbnormalNoteDetailId", |
|
||||
column: x => x.InspectAbnormalNoteDetailId, |
|
||||
principalTable: "Store_InspectAbnormalNoteDetail", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_InspectNoteDetailPhoto", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
InspectNoteDetailId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
PhotoID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_InspectNoteDetailPhoto", x => new { x.InspectNoteDetailId, x.PhotoID }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_Store_InspectNoteDetailPhoto_Store_InspectNoteDetail_InspectNoteDetailId", |
|
||||
column: x => x.InspectNoteDetailId, |
|
||||
principalTable: "Store_InspectNoteDetail", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_ReceiptAbnormalNotePhoto", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
ReceiptAbnormalNoteDetailId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
PhotoID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_ReceiptAbnormalNotePhoto", x => new { x.ReceiptAbnormalNoteDetailId, x.PhotoID }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_Store_ReceiptAbnormalNotePhoto_Store_ReceiptAbnormalNoteDetail_ReceiptAbnormalNoteDetailId", |
|
||||
column: x => x.ReceiptAbnormalNoteDetailId, |
|
||||
principalTable: "Store_ReceiptAbnormalNoteDetail", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -1,588 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations; |
|
||||
|
|
||||
public partial class FlatPersonCountResult : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "InspectUser_Email", |
|
||||
table: "Store_InspectNoteSummaryDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "InspectUser_Name", |
|
||||
table: "Store_InspectNoteSummaryDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "InspectUser_Email", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "InspectUser_Name", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCount_Description", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCount_Qty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCount_Description", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCount_Qty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCount_Description", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCount_Qty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCount_Description", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCount_Qty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCount_Description", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCount_Qty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCount_Description", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCount_Qty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Phone", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "ContactPhone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Name", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "ContactName"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Email", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "ContactEmail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Phone", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "ContactPhone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Name", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "ContactName"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Email", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "ContactEmail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Phone", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "ContactPhone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Name", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "ContactName"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Email", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "ContactEmail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "InspectUser_Phone", |
|
||||
table: "Store_InspectNoteSummaryDetail", |
|
||||
newName: "InspectUser"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "InspectUser_Phone", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
newName: "InspectUser"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Phone", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "ContactPhone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Name", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "ContactName"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "Contacts_Email", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "ContactEmail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCount_Time", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "RepeatCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCount_Operator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "RepeatCountOperator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCount_Time", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "FirstCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCount_Operator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "RepeatCountDescription"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCount_Time", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "AuditCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCount_Operator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "FirstCountOperator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCount_Time", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "RepeatCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCount_Operator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "RepeatCountOperator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCount_Time", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "FirstCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCount_Operator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "RepeatCountDescription"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCount_Time", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "AuditCountTime"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCount_Operator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "FirstCountOperator"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCountDescription", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCountOperator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "AuditCountQty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FirstCountDescription", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "FirstCountQty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "RepeatCountQty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCountDescription", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCountOperator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "AuditCountQty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FirstCountDescription", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "FirstCountQty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "RepeatCountQty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
precision: 18, |
|
||||
scale: 6, |
|
||||
nullable: false, |
|
||||
defaultValue: 0m); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountDescription", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountOperator", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountQty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCountDescription", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCountQty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCountQty", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountDescription", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountOperator", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "AuditCountQty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCountDescription", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FirstCountQty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "RepeatCountQty", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactPhone", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "Contacts_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactName", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "Contacts_Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactEmail", |
|
||||
table: "Store_SupplierAsn", |
|
||||
newName: "Contacts_Email"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactPhone", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "Contacts_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactName", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "Contacts_Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactEmail", |
|
||||
table: "Store_SaleOrder", |
|
||||
newName: "Contacts_Email"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactPhone", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "Contacts_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactName", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "Contacts_Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactEmail", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
newName: "Contacts_Email"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "InspectUser", |
|
||||
table: "Store_InspectNoteSummaryDetail", |
|
||||
newName: "InspectUser_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "InspectUser", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
newName: "InspectUser_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactPhone", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "Contacts_Phone"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactName", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "Contacts_Name"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "ContactEmail", |
|
||||
table: "Store_CustomerAsn", |
|
||||
newName: "Contacts_Email"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountTime", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "RepeatCount_Time"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountOperator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "RepeatCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountDescription", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "FirstCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCountTime", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "FirstCount_Time"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCountOperator", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "AuditCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCountTime", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
newName: "AuditCount_Time"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountTime", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "RepeatCount_Time"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountOperator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "RepeatCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "RepeatCountDescription", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "FirstCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCountTime", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "FirstCount_Time"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "FirstCountOperator", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "AuditCount_Operator"); |
|
||||
|
|
||||
migrationBuilder.RenameColumn( |
|
||||
name: "AuditCountTime", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
newName: "AuditCount_Time"); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "InspectUser_Email", |
|
||||
table: "Store_InspectNoteSummaryDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "InspectUser_Name", |
|
||||
table: "Store_InspectNoteSummaryDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "InspectUser_Email", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "InspectUser_Name", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCount_Description", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "AuditCount_Qty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FirstCount_Description", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "FirstCount_Qty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "RepeatCount_Description", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "RepeatCount_Qty", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "AuditCount_Description", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "AuditCount_Qty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FirstCount_Description", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "FirstCount_Qty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "RepeatCount_Description", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(1024)", |
|
||||
maxLength: 1024, |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<decimal>( |
|
||||
name: "RepeatCount_Qty", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "decimal(18,6)", |
|
||||
nullable: true); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,734 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations; |
|
||||
|
|
||||
public partial class RemoveWorkGroup : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_WarehouseTransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_WarehouseTransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_TransferRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_TransferRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_TransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_TransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ScrapRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ScrapNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ScrapNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_RecycledMaterialReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_PutawayRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_PutawayRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_PutawayNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_PutawayNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReturnRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleMaterialDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ProductionReturnRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ProductionReturnRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ProductionReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ProductionReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_OfflineSettlementNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_NoOkConvertOkNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_NoOkConvertOkNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_MaterialRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_JisProductReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_JisDeliverNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_JisDeliverNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ItemTransformRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ItemTransformRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ItemTransformNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ItemTransformNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_IssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_IssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_IsolationNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_IsolationNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_InventoryTransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_InventoryTransferNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_InventoryInitialNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_DeliverNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_DeliverNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_CustomerReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_CustomerReturnNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountPlanDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountAdjustRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountAdjustNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_BackFlushNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_BackFlushNote"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_WarehouseTransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_WarehouseTransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_TransferRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_TransferRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_TransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_TransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ScrapRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ScrapNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ScrapNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_RecycledMaterialReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ReceiptAbnormalNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_PutawayRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_PutawayRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_PutawayNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_PutawayNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReturnRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_PurchaseReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductRecycleMaterialDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductReceiptRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_ProductReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ProductionReturnRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ProductionReturnRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ProductionReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ProductionReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_OfflineSettlementNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_NoOkConvertOkNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_NoOkConvertOkNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_MaterialRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_JisProductReceiptNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_JisDeliverNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_JisDeliverNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ItemTransformRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ItemTransformRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_ItemTransformNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_ItemTransformNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_IssueNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_IssueNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_IsolationNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_IsolationNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_InventoryTransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_InventoryTransferNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_InventoryInitialNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_DeliverNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_DeliverNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "FromWorkGroup", |
|
||||
table: "Store_CustomerReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ToWorkGroup", |
|
||||
table: "Store_CustomerReturnNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountPlanDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountAdjustRequestDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_CountAdjustNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_BackFlushNoteDetail", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WorkGroup", |
|
||||
table: "Store_BackFlushNote", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: ""); |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,125 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations |
|
||||
{ |
|
||||
public partial class StoreDbEnumToString : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ReturnType", |
|
||||
table: "Store_PurchaseReturnNote", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "AfterPuton"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RequestStatus", |
|
||||
table: "Store_ProductionReturnRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "New"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RequestStatus", |
|
||||
table: "Store_MaterialRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "New"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Stage", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "First"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ReturnType", |
|
||||
table: "Job_PurchaseReturnJob", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldDefaultValue: "AfterPuton"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ReturnType", |
|
||||
table: "Store_PurchaseReturnNote", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "AfterPuton", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RequestStatus", |
|
||||
table: "Store_ProductionReturnRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "New", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "RequestStatus", |
|
||||
table: "Store_MaterialRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "New", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Stage", |
|
||||
table: "Store_CountPlan", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "First", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "ReturnType", |
|
||||
table: "Job_PurchaseReturnJob", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "AfterPuton", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
} |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,95 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations |
|
||||
{ |
|
||||
public partial class Added_Store_Add_SupplierAddress_SupplierName : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_SupplierAsn", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_SupplierAsn", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseReceiptRequest", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseReceiptNote", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_PurchaseReceiptNote", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_PurchaseOrder", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Job_PurchaseReceiptJob", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_SupplierAsn"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_SupplierAsn"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseReceiptRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseReceiptNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_PurchaseReceiptNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Store_PurchaseOrder"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierName", |
|
||||
table: "Store_PurchaseOrder"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "SupplierAddress", |
|
||||
table: "Job_PurchaseReceiptJob"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,68 +0,0 @@ |
|||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations |
|
||||
{ |
|
||||
public partial class Store_AddColumn : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
table: "Store_TransferNote", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptNote", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectRequest", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "CountPrint", |
|
||||
table: "Store_DeliverNote", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_PurchaseReceiptNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "WarehouseCode", |
|
||||
table: "Store_InspectRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CountPrint", |
|
||||
table: "Store_DeliverNote"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
table: "Store_TransferNote", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,644 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
#nullable disable |
|
||||
|
|
||||
namespace Win_in.Sfs.Wms.Store.Migrations |
|
||||
{ |
|
||||
public partial class Mig_Store_Init : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ReasonCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedReceiptRequest", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Store_UnplannedReceiptRequest", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedReceiptNote", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Store_UnplannedReceiptNote", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedIssueRequest", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Store_UnplannedIssueRequest", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedIssueNote", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Store_UnplannedIssueNote", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
table: "Store_ProductReceiptRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: false, |
|
||||
defaultValue: "", |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64, |
|
||||
oldNullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<DateTime>( |
|
||||
name: "InspectDate", |
|
||||
table: "Store_InspectNoteDetail", |
|
||||
type: "datetime2", |
|
||||
nullable: false, |
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "TyrpNumber", |
|
||||
table: "Store_ExchangeData", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Job_UnplannedReceiptJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Job_UnplannedReceiptJob", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Job_UnplannedReceiptJob", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "CaseCode", |
|
||||
table: "Job_UnplannedIssueJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "Explain", |
|
||||
table: "Job_UnplannedIssueJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Job_UnplannedIssueJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Job_UnplannedIssueJobDetail", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<string>( |
|
||||
name: "OANumber", |
|
||||
table: "Job_UnplannedIssueJob", |
|
||||
type: "nvarchar(max)", |
|
||||
nullable: true); |
|
||||
|
|
||||
migrationBuilder.AddColumn<int>( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Job_UnplannedIssueJob", |
|
||||
type: "int", |
|
||||
nullable: false, |
|
||||
defaultValue: 0); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_WipWarehouseAdjustNote", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
RequestNumber = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
JobNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
Confirmed = table.Column<bool>(type: "bit", nullable: false), |
|
||||
ConfirmTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true), |
|
||||
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_WipWarehouseAdjustNote", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_WipWarehouseAdjustRequest", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Type = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true), |
|
||||
Worker = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ActiveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
AutoSubmit = table.Column<bool>(type: "bit", nullable: false), |
|
||||
AutoAgree = table.Column<bool>(type: "bit", nullable: false), |
|
||||
AutoHandle = table.Column<bool>(type: "bit", nullable: false), |
|
||||
AutoCompleteJob = table.Column<bool>(type: "bit", nullable: false), |
|
||||
DirectCreateNote = table.Column<bool>(type: "bit", nullable: false), |
|
||||
RequestStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_WipWarehouseAdjustRequest", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_WipWarehouseAdjustNoteDetail", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Reason = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ReasonCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true), |
|
||||
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|
||||
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
|
||||
FromPackingCode = table.Column<string>(type: "nvarchar(450)", nullable: true), |
|
||||
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ToLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
SupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_WipWarehouseAdjustNoteDetail", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_Store_WipWarehouseAdjustNoteDetail_Store_WipWarehouseAdjustNote_MasterID", |
|
||||
column: x => x.MasterID, |
|
||||
principalTable: "Store_WipWarehouseAdjustNote", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "Store_WipWarehouseAdjustRequestDetail", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
Reason = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
ReasonCode = table.Column<string>(type: "nvarchar(max)", maxLength: 4096, nullable: true), |
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
MasterID = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|
||||
Number = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Remark = table.Column<string>(type: "nvarchar(3072)", maxLength: 3072, nullable: true), |
|
||||
ItemName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemDesc1 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemDesc2 = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ItemCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
Qty = table.Column<decimal>(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), |
|
||||
StdPackQty = table.Column<decimal>(type: "decimal(18,6)", nullable: false), |
|
||||
FromPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ToPackingCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
FromContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ToContainerCode = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
FromLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
ToLot = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
||||
SupplierBatch = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ArriveDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ProduceDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
ExpireDate = table.Column<DateTime>(type: "datetime2", nullable: false), |
|
||||
FromLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
FromLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
FromLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
FromStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToLocationCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToLocationArea = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ToLocationGroup = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|
||||
ToLocationErpCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToWarehouseCode = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|
||||
ToStatus = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_Store_WipWarehouseAdjustRequestDetail", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_Store_WipWarehouseAdjustRequestDetail_Store_WipWarehouseAdjustRequest_MasterID", |
|
||||
column: x => x.MasterID, |
|
||||
principalTable: "Store_WipWarehouseAdjustRequest", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Store_WipWarehouseAdjustNote_Number", |
|
||||
table: "Store_WipWarehouseAdjustNote", |
|
||||
column: "Number", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Store_WipWarehouseAdjustNoteDetail_MasterID", |
|
||||
table: "Store_WipWarehouseAdjustNoteDetail", |
|
||||
column: "MasterID"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Store_WipWarehouseAdjustNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_FromStatus_ToStatus", |
|
||||
table: "Store_WipWarehouseAdjustNoteDetail", |
|
||||
columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus" }, |
|
||||
unique: true, |
|
||||
filter: "[FromPackingCode] IS NOT NULL"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Store_WipWarehouseAdjustRequest_Number", |
|
||||
table: "Store_WipWarehouseAdjustRequest", |
|
||||
column: "Number", |
|
||||
unique: true); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_Store_WipWarehouseAdjustRequestDetail_MasterID", |
|
||||
table: "Store_WipWarehouseAdjustRequestDetail", |
|
||||
column: "MasterID"); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_WipWarehouseAdjustNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_WipWarehouseAdjustRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_WipWarehouseAdjustNote"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "Store_WipWarehouseAdjustRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ReasonCode", |
|
||||
table: "Store_UnplannedReceiptRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedReceiptRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Store_UnplannedReceiptRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedReceiptNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedReceiptNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Store_UnplannedReceiptNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedIssueRequestDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedIssueRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Store_UnplannedIssueRequest"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Store_UnplannedIssueNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Store_UnplannedIssueNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Store_UnplannedIssueNote"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "InspectDate", |
|
||||
table: "Store_InspectNoteDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "TyrpNumber", |
|
||||
table: "Store_ExchangeData"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Job_UnplannedReceiptJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Job_UnplannedReceiptJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Job_UnplannedReceiptJob"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedReceiptType", |
|
||||
table: "Job_UnplannedReceiptJob"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "CaseCode", |
|
||||
table: "Job_UnplannedIssueJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "Explain", |
|
||||
table: "Job_UnplannedIssueJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OnceBusiCode", |
|
||||
table: "Job_UnplannedIssueJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "ProjCapacityCode", |
|
||||
table: "Job_UnplannedIssueJobDetail"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "OANumber", |
|
||||
table: "Job_UnplannedIssueJob"); |
|
||||
|
|
||||
migrationBuilder.DropColumn( |
|
||||
name: "UnplannedIssueType", |
|
||||
table: "Job_UnplannedIssueJob"); |
|
||||
|
|
||||
migrationBuilder.AlterColumn<string>( |
|
||||
name: "Type", |
|
||||
table: "Store_ProductReceiptRequest", |
|
||||
type: "nvarchar(64)", |
|
||||
maxLength: 64, |
|
||||
nullable: true, |
|
||||
oldClrType: typeof(string), |
|
||||
oldType: "nvarchar(64)", |
|
||||
oldMaxLength: 64); |
|
||||
} |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,19 @@ |
|||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Store.Migrations |
||||
|
{ |
||||
|
public partial class @base : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue