学 赵
1 year ago
4 changed files with 5796 additions and 15 deletions
File diff suppressed because it is too large
@ -0,0 +1,200 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202308230001 : Migration |
|||
{ |
|||
protected override void Up(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("0986cf48-5c48-4d14-a7b5-77e0d5da28b9")); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
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("daf33f05-698e-49cf-b688-9288f5e94be5"), null, null, 1, null, "2232ce1052044e5db3c50a381547b2bc", null, null, null, "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, null, 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: "[BillType] IS NOT NULL AND [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("daf33f05-698e-49cf-b688-9288f5e94be5")); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiLog", |
|||
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<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiLog", |
|||
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<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiBalance", |
|||
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<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
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("0986cf48-5c48-4d14-a7b5-77e0d5da28b9"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "60e9bdd1236e478e861a8d0d950d715b", 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"); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue