学 赵
1 year ago
3 changed files with 5653 additions and 7 deletions
File diff suppressed because it is too large
@ -0,0 +1,233 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202308100001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum", |
|||
table: "Set_VmiBalance"); |
|||
|
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("b6018a04-ee6d-447f-8fb8-81eb287a7ebc")); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "factory", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Configcode", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "CodeType", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_PUB_NOT_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_PUB_CAN_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_PUB_ADJ_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ClientCode", |
|||
table: "Set_INVOICE_GRP", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "PreTaxDiff", |
|||
table: "Set_INVOICE_GRP", |
|||
type: "decimal(18,2)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "RealAmt", |
|||
table: "Set_INVOICE_GRP", |
|||
type: "decimal(18,2)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "TaxDiff", |
|||
table: "Set_INVOICE_GRP", |
|||
type: "decimal(18,2)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_NOT_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_CAN_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_ADJ_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_BBAC_NOT_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "PartCode", |
|||
table: "Set_BBAC_CAN_SA_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("6c0cbeb6-6530-4ede-ac96-d0f294f76086"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "4d0aea6c7eb24ecf908624ef4ffc315a", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode" }, |
|||
unique: true, |
|||
filter: "[CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance"); |
|||
|
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("6c0cbeb6-6530-4ede-ac96-d0f294f76086")); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_PUB_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_PUB_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_PUB_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ClientCode", |
|||
table: "Set_INVOICE_GRP"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PreTaxDiff", |
|||
table: "Set_INVOICE_GRP"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealAmt", |
|||
table: "Set_INVOICE_GRP"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TaxDiff", |
|||
table: "Set_INVOICE_GRP"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_HBPO_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_BBAC_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "PartCode", |
|||
table: "Set_BBAC_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "factory", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Configcode", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "CodeType", |
|||
table: "Set_VmiBalance", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("b6018a04-ee6d-447f-8fb8-81eb287a7ebc"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "02418a7349a942d4b3e1fe9a3968a908", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum", |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum" }, |
|||
unique: true, |
|||
filter: "[PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL"); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue