123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace wispro.sp.api.Migrations
- {
- public partial class workflowmodify : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<DateTime>(
- name: "CreateTime",
- table: "Workflow",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<int>(
- name: "CreateUserId",
- table: "Workflow",
- type: "int",
- nullable: false,
- defaultValue: 0);
- migrationBuilder.AddColumn<DateTime>(
- name: "EffectivrDate",
- table: "Workflow",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<DateTime>(
- name: "ExpirationDate",
- table: "Workflow",
- type: "datetime2",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
- migrationBuilder.AddColumn<string>(
- name: "Memo",
- table: "Workflow",
- type: "nvarchar(max)",
- nullable: true);
- migrationBuilder.AlterColumn<string>(
- name: "DoItemMemo",
- table: "PerformanceItem",
- type: "nvarchar(max)",
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(500)",
- oldMaxLength: 500,
- oldNullable: true);
- migrationBuilder.InsertData(
- table: "BasePointRule",
- columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
- values: new object[] { 138, "0.2", 85, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"形式\" && (p.PreOastaffId != null && p.ItemStaffs.Where<ItemStaff>(s => s.DoPersonId == p.PreOastaffId).Count() == 0)", "OA" });
- migrationBuilder.InsertData(
- table: "BasePointRule",
- columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
- values: new object[] { 139, "0.5", 84, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"实质\" && (p.PreOastaffId != null && p.ItemStaffs.Where<ItemStaff>(s => s.DoPersonId == p.PreOastaffId).Count() == 0)", "OA" });
- migrationBuilder.InsertData(
- table: "BasePointRule",
- columns: new[] { "Id", "PointExpress", "Priority", "Rule", "Type" },
- values: new object[] { 140, "0.3", 83, "p.DoItem==\"处理审查意见\" && p.ApplicationType==\"发明\" && p.DoItemCoefficient==\"非实质\" && (p.PreOastaffId != null && p.ItemStaffs.Where<ItemStaff>(s => s.DoPersonId == p.PreOastaffId).Count() == 0)", "OA" });
- migrationBuilder.CreateIndex(
- name: "IX_Workflow_CreateUserId",
- table: "Workflow",
- column: "CreateUserId");
- migrationBuilder.AddForeignKey(
- name: "FK_Workflow_Staff_CreateUserId",
- table: "Workflow",
- column: "CreateUserId",
- principalTable: "Staff",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Workflow_Staff_CreateUserId",
- table: "Workflow");
- migrationBuilder.DropIndex(
- name: "IX_Workflow_CreateUserId",
- table: "Workflow");
- migrationBuilder.DeleteData(
- table: "BasePointRule",
- keyColumn: "Id",
- keyValue: 138);
- migrationBuilder.DeleteData(
- table: "BasePointRule",
- keyColumn: "Id",
- keyValue: 139);
- migrationBuilder.DeleteData(
- table: "BasePointRule",
- keyColumn: "Id",
- keyValue: 140);
- migrationBuilder.DropColumn(
- name: "CreateTime",
- table: "Workflow");
- migrationBuilder.DropColumn(
- name: "CreateUserId",
- table: "Workflow");
- migrationBuilder.DropColumn(
- name: "EffectivrDate",
- table: "Workflow");
- migrationBuilder.DropColumn(
- name: "ExpirationDate",
- table: "Workflow");
- migrationBuilder.DropColumn(
- name: "Memo",
- table: "Workflow");
- migrationBuilder.AlterColumn<string>(
- name: "DoItemMemo",
- table: "PerformanceItem",
- type: "nvarchar(500)",
- maxLength: 500,
- nullable: true,
- oldClrType: typeof(string),
- oldType: "nvarchar(max)",
- oldNullable: true);
- }
- }
- }
|