539 lines
28 KiB
C#
539 lines
28 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Added_JobTicket_Related_Tables : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "JobStatus",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
DisplayName = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobStatus", x => x.Id);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobTags",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobTags", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobTags_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ServiceProjectTags",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ServiceProjectTags", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_ServiceProjectTags_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "TeamRoleMasters",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Name = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_TeamRoleMasters", x => x.Id);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobTickets",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
Title = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
DueDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobTickets", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_Employees_AssigneeId",
|
|
column: x => x.AssigneeId,
|
|
principalTable: "Employees",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_Employees_CreatedById",
|
|
column: x => x.CreatedById,
|
|
principalTable: "Employees",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_Employees_UpdatedById",
|
|
column: x => x.UpdatedById,
|
|
principalTable: "Employees",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_JobStatus_StatusId",
|
|
column: x => x.StatusId,
|
|
principalTable: "JobStatus",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_ServiceProjects_ProjectId",
|
|
column: x => x.ProjectId,
|
|
principalTable: "ServiceProjects",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobTickets_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ServiceProjectTagMappings",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
ServiceProjectTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
ServiceProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ServiceProjectTagMappings", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_ServiceProjectTagMappings_ServiceProjectTags_ServiceProjectT~",
|
|
column: x => x.ServiceProjectTagId,
|
|
principalTable: "ServiceProjectTags",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_ServiceProjectTagMappings_ServiceProjects_ServiceProjectId",
|
|
column: x => x.ServiceProjectId,
|
|
principalTable: "ServiceProjects",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobStatusMappings",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TeamRoleId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobStatusMappings", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobStatusMappings_JobStatus_NextStatusId",
|
|
column: x => x.NextStatusId,
|
|
principalTable: "JobStatus",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobStatusMappings_JobStatus_StatusId",
|
|
column: x => x.StatusId,
|
|
principalTable: "JobStatus",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobStatusMappings_TeamRoleMasters_TeamRoleId",
|
|
column: x => x.TeamRoleId,
|
|
principalTable: "TeamRoleMasters",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_JobStatusMappings_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobEmployeeMappings",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
AssigneeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobEmployeeMappings", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobEmployeeMappings_Employees_AssigneeId",
|
|
column: x => x.AssigneeId,
|
|
principalTable: "Employees",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobEmployeeMappings_JobTickets_JobTicketId",
|
|
column: x => x.JobTicketId,
|
|
principalTable: "JobTickets",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobEmployeeMappings_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobTagMappings",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
JobTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobTagMappings", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobTagMappings_JobTags_JobTagId",
|
|
column: x => x.JobTagId,
|
|
principalTable: "JobTags",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobTagMappings_JobTickets_JobTicketId",
|
|
column: x => x.JobTicketId,
|
|
principalTable: "JobTickets",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobTagMappings_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "JobUpdateLogs",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
JobTicketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
StatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
NextStatusId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
Comment = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_JobUpdateLogs", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_JobUpdateLogs_Employees_UpdatedById",
|
|
column: x => x.UpdatedById,
|
|
principalTable: "Employees",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobUpdateLogs_JobStatus_NextStatusId",
|
|
column: x => x.NextStatusId,
|
|
principalTable: "JobStatus",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_JobUpdateLogs_JobStatus_StatusId",
|
|
column: x => x.StatusId,
|
|
principalTable: "JobStatus",
|
|
principalColumn: "Id");
|
|
table.ForeignKey(
|
|
name: "FK_JobUpdateLogs_JobTickets_JobTicketId",
|
|
column: x => x.JobTicketId,
|
|
principalTable: "JobTickets",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
table.ForeignKey(
|
|
name: "FK_JobUpdateLogs_Tenants_TenantId",
|
|
column: x => x.TenantId,
|
|
principalTable: "Tenants",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
})
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "JobStatus",
|
|
columns: new[] { "Id", "DisplayName", "Name" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), "New", "New" },
|
|
{ new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), "Closed", "Closed" },
|
|
{ new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), "In Progress", "In Progress" },
|
|
{ new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), "On Hold", "On Hold" },
|
|
{ new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), "Resolved", "Resolved" },
|
|
{ new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), "Assigned", "Assigned" },
|
|
{ new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), "Done", "Done" }
|
|
});
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "TeamRoleMasters",
|
|
columns: new[] { "Id", "Description", "Name" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("03bf5853-5e0b-4eb8-9f37-33bd999a05b3"), "A Manager oversees and coordinates a team or department to achieve organizational goals through planning, decision-making, and leadership.", "Manager" },
|
|
{ new Guid("145d7222-408b-4733-8a17-f417e070b8b8"), "A Service Engineer installs, maintains, repairs, and troubleshoots equipment to ensure optimal operation and customer satisfaction.", "Service Engineer" },
|
|
{ new Guid("8cfbf16f-7d3b-4c29-af5b-18935f20aa7b"), "A Support role involves assisting users or customers by resolving technical or service-related issues, answering inquiries, and ensuring a positive experience with products or services.", "Support" }
|
|
});
|
|
|
|
migrationBuilder.InsertData(
|
|
table: "JobStatusMappings",
|
|
columns: new[] { "Id", "NextStatusId", "StatusId", "TeamRoleId", "TenantId" },
|
|
values: new object[,]
|
|
{
|
|
{ new Guid("024e1810-6a57-4a0d-8d2e-be88da79fcd4"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("32d76a02-8f44-4aa0-9b66-c3716c45a918"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("16c83c23-09be-40fd-9d05-f44795d8dee8"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("2787c903-1b39-4e7d-a0f2-3bb2309bb341"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("42f24930-387e-4f51-9c2d-3e29ffaaf02a"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("5602d32c-290e-48a3-83dd-91af6d12ed46"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("7165ecee-10e3-4fc0-85d2-6d93d5b11776"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("76bc5551-8f80-469d-ba23-95d7e746c9a9"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("87891499-e45d-406b-bf22-722db1beedc9"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("8c4ecdae-7435-4475-8389-15bc453561a1"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("9c2918be-b3c1-46fb-a03b-14dd613e1021"), new Guid("3ddeefb5-ae3c-4e10-a922-35e0a452bb69"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("a44b0a66-ee33-47e7-a01f-6b8d9b621543"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("ab974bdb-2d8f-4ddc-9b71-bd6d198bae75"), new Guid("75a0c8b8-9c6a-41af-80bf-b35bab722eb2"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("ca8b4358-3122-4aaa-bcf8-0b66e4ab313a"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("cb0db140-87fa-4a6f-812d-2834bd0f53a9"), new Guid("5a6873a5-fed7-4745-a52f-8f61bf3bd72d"), new Guid("cfa1886d-055f-4ded-84c6-42a2a8a14a66"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
{ new Guid("dc986ec4-858e-4c98-b330-4a5c98c91f07"), new Guid("ed10ab57-dbaa-4ca5-8ecd-56745dcbdbd7"), new Guid("aab71020-2fb8-44d9-9430-c9a7e9bf33b0"), null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobEmployeeMappings_AssigneeId",
|
|
table: "JobEmployeeMappings",
|
|
column: "AssigneeId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobEmployeeMappings_JobTicketId",
|
|
table: "JobEmployeeMappings",
|
|
column: "JobTicketId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobEmployeeMappings_TenantId",
|
|
table: "JobEmployeeMappings",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobStatusMappings_NextStatusId",
|
|
table: "JobStatusMappings",
|
|
column: "NextStatusId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobStatusMappings_StatusId",
|
|
table: "JobStatusMappings",
|
|
column: "StatusId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobStatusMappings_TeamRoleId",
|
|
table: "JobStatusMappings",
|
|
column: "TeamRoleId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobStatusMappings_TenantId",
|
|
table: "JobStatusMappings",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTagMappings_JobTagId",
|
|
table: "JobTagMappings",
|
|
column: "JobTagId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTagMappings_JobTicketId",
|
|
table: "JobTagMappings",
|
|
column: "JobTicketId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTagMappings_TenantId",
|
|
table: "JobTagMappings",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTags_TenantId",
|
|
table: "JobTags",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_AssigneeId",
|
|
table: "JobTickets",
|
|
column: "AssigneeId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_CreatedById",
|
|
table: "JobTickets",
|
|
column: "CreatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_ProjectId",
|
|
table: "JobTickets",
|
|
column: "ProjectId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_StatusId",
|
|
table: "JobTickets",
|
|
column: "StatusId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_TenantId",
|
|
table: "JobTickets",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobTickets_UpdatedById",
|
|
table: "JobTickets",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobUpdateLogs_JobTicketId",
|
|
table: "JobUpdateLogs",
|
|
column: "JobTicketId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobUpdateLogs_NextStatusId",
|
|
table: "JobUpdateLogs",
|
|
column: "NextStatusId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobUpdateLogs_StatusId",
|
|
table: "JobUpdateLogs",
|
|
column: "StatusId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobUpdateLogs_TenantId",
|
|
table: "JobUpdateLogs",
|
|
column: "TenantId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_JobUpdateLogs_UpdatedById",
|
|
table: "JobUpdateLogs",
|
|
column: "UpdatedById");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_ServiceProjectTagMappings_ServiceProjectId",
|
|
table: "ServiceProjectTagMappings",
|
|
column: "ServiceProjectId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_ServiceProjectTagMappings_ServiceProjectTagId",
|
|
table: "ServiceProjectTagMappings",
|
|
column: "ServiceProjectTagId");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_ServiceProjectTags_TenantId",
|
|
table: "ServiceProjectTags",
|
|
column: "TenantId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "JobEmployeeMappings");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobStatusMappings");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobTagMappings");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobUpdateLogs");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ServiceProjectTagMappings");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "TeamRoleMasters");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobTags");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobTickets");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ServiceProjectTags");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "JobStatus");
|
|
}
|
|
}
|
|
}
|