wanggang
1 year ago
7 changed files with 5694 additions and 123 deletions
File diff suppressed because it is too large
@ -0,0 +1,186 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class vmi11 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropUniqueConstraint( |
||||
|
name: "AK_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum", |
||||
|
table: "Set_VmiBalance"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "PartCode", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "BillType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "ProType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "SubBillType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "TransType", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "4affb77e506d43dda8bc322162fcb335"); |
||||
|
|
||||
|
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"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropIndex( |
||||
|
name: "IX_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum", |
||||
|
table: "Set_VmiBalance"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BillType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ProType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SubBillType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "TransType", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "PartCode", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "nvarchar(450)", |
||||
|
nullable: false, |
||||
|
defaultValue: "", |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "nvarchar(450)", |
||||
|
oldNullable: true); |
||||
|
|
||||
|
migrationBuilder.AddUniqueConstraint( |
||||
|
name: "AK_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum", |
||||
|
table: "Set_VmiBalance", |
||||
|
columns: new[] { "BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum" }); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "7ee5d3ed981d4f87963af8b5654cd9df"); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue