| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- namespace ContractService.Migrations
- {
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure.Annotations;
- using System.Data.Entity.Migrations;
-
- public partial class Update20210320001 : DbMigration
- {
- public override void Up()
- {
- AlterTableAnnotations(
- "dbo.Ls_LegalContractKeyPoints",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ParentNo = c.String(maxLength: 128),
- Name = c.String(maxLength: 50),
- Tags = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- KeyPointLevel = c.Int(nullable: false),
- KeyPointState = c.Int(nullable: false),
- ExpireDate = c.DateTime(),
- AlarmDate = c.DateTime(),
- ExecuteDate = c.DateTime(),
- ExpireDay = c.Int(nullable: false),
- AlarmDay = c.Int(nullable: false),
- KeyPointPath = c.String(maxLength: 500),
- ContractNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- NotifyType = c.Int(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_LegalContractKeyPointInfo_SoftDelete",
- new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
- },
- });
-
- AddColumn("dbo.Ls_LegalContractKeyPoints", "IsDeleted", c => c.Boolean(nullable: false));
- AddColumn("dbo.Ls_LegalContractKeyPoints", "DeleterUserId", c => c.Long());
- AddColumn("dbo.Ls_LegalContractKeyPoints", "DeletionTime", c => c.DateTime());
- CreateIndex("dbo.Ls_LegalContractKeyPoints", "IsDeleted");
- CreateIndex("dbo.Ls_LegalContractKeyPoints", "DeleterUserId");
- AddForeignKey("dbo.Ls_LegalContractKeyPoints", "DeleterUserId", "dbo.Sys_Users", "Id");
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.Ls_LegalContractKeyPoints", "DeleterUserId", "dbo.Sys_Users");
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "DeleterUserId" });
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "IsDeleted" });
- DropColumn("dbo.Ls_LegalContractKeyPoints", "DeletionTime");
- DropColumn("dbo.Ls_LegalContractKeyPoints", "DeleterUserId");
- DropColumn("dbo.Ls_LegalContractKeyPoints", "IsDeleted");
- AlterTableAnnotations(
- "dbo.Ls_LegalContractKeyPoints",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ParentNo = c.String(maxLength: 128),
- Name = c.String(maxLength: 50),
- Tags = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- KeyPointLevel = c.Int(nullable: false),
- KeyPointState = c.Int(nullable: false),
- ExpireDate = c.DateTime(),
- AlarmDate = c.DateTime(),
- ExecuteDate = c.DateTime(),
- ExpireDay = c.Int(nullable: false),
- AlarmDay = c.Int(nullable: false),
- KeyPointPath = c.String(maxLength: 500),
- ContractNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- NotifyType = c.Int(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_LegalContractKeyPointInfo_SoftDelete",
- new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
- },
- });
-
- }
- }
- }
|