Compare commits
15 Commits
main
...
Activity_H
Author | SHA1 | Date | |
---|---|---|---|
263d55cff0 | |||
dd9ee03282 | |||
36dc5e8950 | |||
eb75e2f723 | |||
a3f92011fe | |||
34344cb08f | |||
d63328f5e6 | |||
cc96756e41 | |||
c793e9178d | |||
512dcd5396 | |||
083f2c53d5 | |||
c5830fb222 | |||
3bab7badb3 | |||
f6fa0bee1e | |||
f3cf2092a9 |
File diff suppressed because one or more lines are too long
@ -62,6 +62,7 @@ namespace Marco.Pms.DataAccess.Initializer
|
|||||||
// State = "State",
|
// State = "State",
|
||||||
// Postalcode = "1234567890",
|
// Postalcode = "1234567890",
|
||||||
// City = "City",
|
// City = "City",
|
||||||
|
TenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"),
|
||||||
IsRootUser = true,
|
IsRootUser = true,
|
||||||
|
|
||||||
}, "User@123").GetAwaiter().GetResult();
|
}, "User@123").GetAwaiter().GetResult();
|
||||||
@ -77,10 +78,13 @@ namespace Marco.Pms.DataAccess.Initializer
|
|||||||
Gender = "",
|
Gender = "",
|
||||||
EmergencyPhoneNumber = "1234567890",
|
EmergencyPhoneNumber = "1234567890",
|
||||||
CurrentAddress = "",
|
CurrentAddress = "",
|
||||||
|
AadharNumber = "1234567890",
|
||||||
ApplicationUserId = user.Id,
|
ApplicationUserId = user.Id,
|
||||||
BirthDate = DateTime.MinValue,
|
BirthDate = DateTime.MinValue,
|
||||||
|
PanNumber = "",
|
||||||
PermanentAddress = "",
|
PermanentAddress = "",
|
||||||
PhoneNumber = ""
|
PhoneNumber = "",
|
||||||
|
TenantId = user.TenantId
|
||||||
};
|
};
|
||||||
_db.Employees.Add(emp);
|
_db.Employees.Add(emp);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,209 @@
|
|||||||
|
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_Service_And_ActivityGroup_Master_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ActivityMasters",
|
||||||
|
keyColumn: "UnitOfMeasurement",
|
||||||
|
keyValue: null,
|
||||||
|
column: "UnitOfMeasurement",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "UnitOfMeasurement",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.UpdateData(
|
||||||
|
table: "ActivityMasters",
|
||||||
|
keyColumn: "ActivityName",
|
||||||
|
keyValue: null,
|
||||||
|
column: "ActivityName",
|
||||||
|
value: "");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ActivityName",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ActitvityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ServiceId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ActivityGroupMasters",
|
||||||
|
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"),
|
||||||
|
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||||
|
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ActivityGroupMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ActivityGroupMasters_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ServicesMasters",
|
||||||
|
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"),
|
||||||
|
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ServicesMasters", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ServicesMasters_Tenants_TenantId",
|
||||||
|
column: x => x.TenantId,
|
||||||
|
principalTable: "Tenants",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "IsSystem", "Name", "ServiceId", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("0398ba10-f814-404a-a7a2-3bac0f61a9a5"), "Partition Work involves constructing internal dividing walls using materials like gypsum, glass, or wood to create separate rooms or functional spaces within a building.", true, true, "Partition Work", new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("1805e22d-4220-45cc-8f39-35194c2499a5"), "Ducting Work involves fabricating, installing, and insulating ducts to distribute conditioned air throughout the building as part of the HVAC system.", true, true, "Ducting Work", new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("1d29b7d1-ffdc-486d-ac7b-ee2661ae9979"), "Foundation Work involves excavating, reinforcing, and casting the base structure that supports the entire building load, including footings and plinth beams.", true, true, "Foundation Work", new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("3a712ddb-8927-4d58-8b24-83290e6ba8d1"), "Sub-Structure Work involves constructing the portion of the building below ground level, including plinth beams, basement walls, and backfilling, to support the superstructure.", true, true, "Sub-Structure Work", new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("3ef85f9f-e23e-4e6f-9cb7-40ec70a184dd"), "Conduiting & Cabling involves laying electrical conduits and pulling cables to safely route and protect electrical wiring throughout a building.", true, true, "Conduiting & Cabling", new Guid("e3c1d91d-7e86-4257-9c2d-04a4352d8283"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("44326c01-f69e-430c-a403-d5bf3dcc35d5"), "Rainwater Harvesting involves collecting, channeling, and storing rainwater from rooftops or surfaces for reuse or groundwater recharge.", true, true, "Rainwater Harvesting", new Guid("fa208600-b761-480d-95ad-98cad2e61c9b"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("47fa23fb-0e1c-459e-9cc9-9136c61effbd"), "Super-Structure Work involves constructing the part of the building above ground level, including columns, beams, slabs, and walls, forming the main structural framework.", true, true, "Super-Structure Work", new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("56584b0f-b2a5-4a5e-afea-590516473bcd"), "Sprinkler System involves installing a network of pipes and sprinkler heads designed to automatically discharge water to suppress or extinguish fires.", true, true, "Sprinkler System", new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("69819ea6-5550-4325-9097-c52d95db0822"), "Equipment Installation involves setting up HVAC units such as AHUs, FCUs, chillers, and compressors to enable heating, cooling, and ventilation operations in the building.", true, true, "Equipment Installation", new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("6eedb9f1-22e9-4d93-b770-593125085465"), "Public Address (PA) System involves installing speakers, microphones, amplifiers, and control units to broadcast announcements, alerts, and emergency messages throughout a building or facility.", true, true, "Public Address (PA) System", new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("6f048b41-f909-41dd-af5f-02369ca80639"), "Site Preparation involves clearing, leveling, and preparing the land for construction by removing obstacles, performing excavation, and conducting soil tests.", true, true, "Site Preparation", new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("7613959e-5718-4e46-926b-efa45722c844"), "Water Supply System involves installing pipelines, pumps, tanks, and fittings to ensure the reliable distribution of clean water throughout a building or facility.", true, true, "Water Supply System", new Guid("fa208600-b761-480d-95ad-98cad2e61c9b"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("78a12040-4ab6-493a-b199-ee636f45f77f"), "Fire Hydrant System involves installing external and internal hydrants, piping, and valves to provide high-pressure water access for manual firefighting during emergencies.", true, true, "Fire Hydrant System", new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("97c6f9f5-cd4d-4830-ba14-a81f6ee0d1e2"), "Detection and Alarm System involves installing smoke detectors, heat sensors, and fire alarm panels to automatically detect fire or smoke and alert occupants through audible and visual alarms.", true, true, "Detection and Alarm System", new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("9efaa80a-f115-4e78-866a-5e192faa1024"), "False Ceiling Work involves installing suspended ceilings made of materials like gypsum, metal, or POP to conceal services, improve aesthetics, and enhance acoustic and thermal performance.", true, true, "False Ceiling Work", new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("a27d502b-20ea-4926-b294-3db7110f94e5"), "Data & Communication Cabling involves laying structured cables for internet, telephone, and networking systems to ensure reliable communication and connectivity throughout the building.", true, true, "Data & Communication Cabling", new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("a71182a5-0579-4624-b252-4cae2ea11948"), "Wiring Installation involves connecting electrical wires from distribution boards to switches, sockets, and fixtures to provide power and lighting within a building.", true, true, "Wiring Installation", new Guid("e3c1d91d-7e86-4257-9c2d-04a4352d8283"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("b5e2291f-3569-45e5-9c30-ef33ad0abbf1"), "Lighting System involves installing and connecting various lighting fixtures, controls, and fittings to ensure proper illumination for indoor and outdoor areas.", true, true, "Lighting System", new Guid("e3c1d91d-7e86-4257-9c2d-04a4352d8283"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("ba4ada9c-ed35-4d5e-bc9f-216f32612c85"), "Drainage & Wastewater System involves installing pipes, traps, and chambers to safely collect and dispose of wastewater and sewage from a building to the municipal or septic system.", true, true, "Drainage & Wastewater System", new Guid("fa208600-b761-480d-95ad-98cad2e61c9b"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("c0a9e90c-4c74-417d-b36e-6e63eca16463"), "Door & Window Installation involves fitting and fixing doors and windows made of wood, aluminum, uPVC, or glass to provide access, ventilation, and natural light within the building.", true, true, "Door & Window Installation", new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("cdea8e5f-8b78-4f7e-ab65-bd6b38d81af2"), "HVAC System Design & Planning involves calculating heating and cooling loads, selecting appropriate equipment, and designing duct and piping layouts to ensure efficient climate control and air quality.", true, true, "HVAC System Design & Planning", new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("fbb04bec-53a7-4f86-8536-34c4b5c691a2"), "Liaisoning – Fire Fighting involves coordinating with fire authorities to obtain necessary approvals and no-objection certificates (NOCs) for fire safety systems, ensuring compliance with local fire safety regulations.", true, true, "Liaisoning", new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("fe613446-c399-4a5c-8205-fd3652231f57"), "Ventilation System involves installing exhausts, fresh air units, and ductwork to ensure proper air circulation, removal of stale air, and maintenance of indoor air quality.", true, true, "Ventilation System", new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"), new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.InsertData(
|
||||||
|
table: "ServicesMasters",
|
||||||
|
columns: new[] { "Id", "Description", "IsActive", "IsSystem", "Name", "TenantId" },
|
||||||
|
values: new object[,]
|
||||||
|
{
|
||||||
|
{ new Guid("0aa3e986-d6a4-49b4-818b-564d2d7799a2"), "Construction Civil service involves planning, designing, and overseeing infrastructure and building projects", true, true, "Civil", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("8d196e15-4099-4c9a-9a84-86650d79d4b4"), "Interior infrastructure (Interior Infra) service involves the construction and installation of essential internal structural elements like partitions, ceilings, flooring, and utility layouts to prepare spaces for interior design and functional use.", true, true, "Interior infrastructure", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("da465f54-0f58-48c8-ab1d-8e31d59b3607"), "Fire fighting service involves installing and maintaining systems like sprinklers, hydrants, and alarms to detect, control, and extinguish fires in buildings and facilities.", true, true, "Fire fighting", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("df3805d6-8d02-45cb-9c53-5c42b527ebb6"), "HVAC (Heating, Ventilation, and Air Conditioning) service involves the installation, maintenance, and repair of systems that control indoor climate, air quality, and thermal comfort in buildings.", true, true, "HVAC", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("e3c1d91d-7e86-4257-9c2d-04a4352d8283"), "Electric service involves the installation, maintenance, and repair of electrical systems, including wiring, lighting, and power distribution in buildings and infrastructure", true, true, "Electric", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
||||||
|
{ new Guid("fa208600-b761-480d-95ad-98cad2e61c9b"), "Plumbing service involves installing, maintaining, and repairing systems for water supply, drainage, and sewage in residential, commercial, and industrial buildings", true, true, "Plumbing", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityGroupMasters_TenantId",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
column: "TenantId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ServicesMasters_TenantId",
|
||||||
|
table: "ServicesMasters",
|
||||||
|
column: "TenantId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ActivityGroupMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ServicesMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ActitvityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ServiceId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "UnitOfMeasurement",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ActivityName",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Marco.Pms.DataAccess.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Added_Forgien_Keys_In_Activity_And_ActivityGroup_Master_Table : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityMasters_ActitvityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ActitvityGroupId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityMasters_ServiceId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ActivityGroupMasters_ServiceId",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
column: "ServiceId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ActivityGroupMasters_ServicesMasters_ServiceId",
|
||||||
|
table: "ActivityGroupMasters",
|
||||||
|
column: "ServiceId",
|
||||||
|
principalTable: "ServicesMasters",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ActivityGroupMasters_ActitvityGroupId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ActitvityGroupId",
|
||||||
|
principalTable: "ActivityGroupMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ServicesMasters_ServiceId",
|
||||||
|
table: "ActivityMasters",
|
||||||
|
column: "ServiceId",
|
||||||
|
principalTable: "ServicesMasters",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ActivityGroupMasters_ServicesMasters_ServiceId",
|
||||||
|
table: "ActivityGroupMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ActivityGroupMasters_ActitvityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ActivityMasters_ServicesMasters_ServiceId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ActivityMasters_ActitvityGroupId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ActivityMasters_ServiceId",
|
||||||
|
table: "ActivityMasters");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_ActivityGroupMasters_ServiceId",
|
||||||
|
table: "ActivityGroupMasters");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,37 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_New_Parameter_In_Tenant_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "OfficeNumber",
|
|
||||||
table: "Tenants",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Tenants",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"),
|
|
||||||
column: "OfficeNumber",
|
|
||||||
value: null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "OfficeNumber",
|
|
||||||
table: "Tenants");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Fixed_Spelling_Mistake_In_Tenant_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "OragnizationSize",
|
|
||||||
table: "Tenants",
|
|
||||||
newName: "OrganizationSize");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "OrganizationSize",
|
|
||||||
table: "Tenants",
|
|
||||||
newName: "OragnizationSize");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,207 +0,0 @@
|
|||||||
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_Subscription_Related_Tables : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "SubscriptionStatus",
|
|
||||||
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")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SubscriptionStatus", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "SubscriptionPlans",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PlanName = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
PriceQuarterly = table.Column<double>(type: "double", nullable: false),
|
|
||||||
PriceMonthly = table.Column<double>(type: "double", nullable: false),
|
|
||||||
PriceHalfMonthly = table.Column<double>(type: "double", nullable: false),
|
|
||||||
PriceYearly = table.Column<double>(type: "double", nullable: false),
|
|
||||||
TrialDays = table.Column<int>(type: "int", nullable: false),
|
|
||||||
MaxUser = table.Column<double>(type: "double", nullable: false),
|
|
||||||
MaxStorage = table.Column<double>(type: "double", nullable: false),
|
|
||||||
FeaturesId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreateAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
UpdateAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SubscriptionPlans", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_CurrencyMaster_CurrencyId",
|
|
||||||
column: x => x.CurrencyId,
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "TenantSubscriptions",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PlanId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
IsTrial = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
StatusId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
NextBillingDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
CancellationDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
AutoRemew = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
UpdateAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
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_TenantSubscriptions", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_CurrencyMaster_CurrencyId",
|
|
||||||
column: x => x.CurrencyId,
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionPlans_PlanId",
|
|
||||||
column: x => x.PlanId,
|
|
||||||
principalTable: "SubscriptionPlans",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionStatus_StatusId",
|
|
||||||
column: x => x.StatusId,
|
|
||||||
principalTable: "SubscriptionStatus",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "SubscriptionStatus",
|
|
||||||
columns: new[] { "Id", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("1c0e422e-01b6-412f-b72a-1db004cc8a7f"), "Suspended" },
|
|
||||||
{ new Guid("4ed487b1-af22-4e25-aecd-b63fd850cf2d"), "InActive" },
|
|
||||||
{ new Guid("cd3a68ea-41fd-42f0-bd0c-c871c7337727"), "Active" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CreatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CurrencyId",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_UpdatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_CreatedById",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_CurrencyId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_PlanId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PlanId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_StatusId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "StatusId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_TenantId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantSubscriptions_UpdatedById",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "UpdatedById");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "SubscriptionStatus");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Corrected_Typo_In_Subscription_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "AutoRemew",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
newName: "AutoRenew");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "AutoRenew",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
newName: "AutoRemew");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Corrected_Typo_In_SubscriptionPlan_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "PriceHalfMonthly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
newName: "PriceHalfYearly");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "PriceHalfYearly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
newName: "PriceHalfMonthly");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,411 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Seprated_SubscriptionPlan_And_SubscriptionPlanDetails : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_StatusMasters_Tenants_TenantId",
|
|
||||||
table: "StatusMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_CurrencyMaster_CurrencyId",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_CreatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_UpdatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionPlans_PlanId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CreatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CurrencyId",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_SubscriptionPlans_UpdatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_StatusMasters_TenantId",
|
|
||||||
table: "StatusMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CreateAt",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CreatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "CurrencyId",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "FeaturesId",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MaxStorage",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MaxUser",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PriceHalfYearly",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PriceMonthly",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PriceQuarterly",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PriceYearly",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TrialDays",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "UpdateAt",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "UpdatedById",
|
|
||||||
table: "SubscriptionPlans");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "StatusMasters");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsCancelled",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "MaxUsers",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "SubscriptionPlanDetails",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Price = table.Column<double>(type: "double", nullable: false),
|
|
||||||
Frequency = table.Column<int>(type: "int", nullable: false),
|
|
||||||
TrialDays = table.Column<int>(type: "int", nullable: false),
|
|
||||||
MaxUser = table.Column<double>(type: "double", nullable: false),
|
|
||||||
MaxStorage = table.Column<double>(type: "double", nullable: false),
|
|
||||||
FeaturesId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreateAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
UpdateAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
PlanId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CurrencyId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_SubscriptionPlanDetails", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlanDetails_CurrencyMaster_CurrencyId",
|
|
||||||
column: x => x.CurrencyId,
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlanDetails_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlanDetails_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_SubscriptionPlanDetails_SubscriptionPlans_PlanId",
|
|
||||||
column: x => x.PlanId,
|
|
||||||
principalTable: "SubscriptionPlans",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlanDetails_CreatedById",
|
|
||||||
table: "SubscriptionPlanDetails",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlanDetails_CurrencyId",
|
|
||||||
table: "SubscriptionPlanDetails",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlanDetails_PlanId",
|
|
||||||
table: "SubscriptionPlanDetails",
|
|
||||||
column: "PlanId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlanDetails_UpdatedById",
|
|
||||||
table: "SubscriptionPlanDetails",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionPlanDetails_PlanId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PlanId",
|
|
||||||
principalTable: "SubscriptionPlanDetails",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionPlanDetails_PlanId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "SubscriptionPlanDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsCancelled",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "MaxUsers",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "CreateAt",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "CreatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "CurrencyId",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "FeaturesId",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "MaxStorage",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "MaxUser",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "PriceHalfYearly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "PriceMonthly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "PriceQuarterly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<double>(
|
|
||||||
name: "PriceYearly",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "double",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0.0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "TrialDays",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "int",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "UpdateAt",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "UpdatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "StatusMasters",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "StatusMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("33deaef9-9af1-4f2a-b443-681ea0d04f81"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "StatusMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("603e994b-a27f-4e5d-a251-f3d69b0498ba"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "StatusMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("b74da4c2-d07e-46f2-9919-e75e49b12731"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "StatusMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cdad86aa-8a56-4ff4-b633-9c629057dfef"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "StatusMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("ef1c356e-0fe0-42df-a5d3-8daee355492d"),
|
|
||||||
column: "TenantId",
|
|
||||||
value: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"));
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CreatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_CurrencyId",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CurrencyId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_SubscriptionPlans_UpdatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_StatusMasters_TenantId",
|
|
||||||
table: "StatusMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_StatusMasters_Tenants_TenantId",
|
|
||||||
table: "StatusMasters",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_CurrencyMaster_CurrencyId",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CurrencyId",
|
|
||||||
principalTable: "CurrencyMaster",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_CreatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "CreatedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_SubscriptionPlans_Employees_UpdatedById",
|
|
||||||
table: "SubscriptionPlans",
|
|
||||||
column: "UpdatedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_SubscriptionPlans_PlanId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PlanId",
|
|
||||||
principalTable: "SubscriptionPlans",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_FCMTokenMApping_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "FCMTokenMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
FcmToken = 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_FCMTokenMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_FCMTokenMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_FCMTokenMappings_TenantId",
|
|
||||||
table: "FCMTokenMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "FCMTokenMappings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Expriy_Date_In_FCMMapping_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "ExpiredAt",
|
|
||||||
table: "FCMTokenMappings",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ExpiredAt",
|
|
||||||
table: "FCMTokenMappings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,488 +0,0 @@
|
|||||||
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_Document_Manager_Tables : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentTagMasters",
|
|
||||||
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"),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_DocumentTagMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentTagMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "EntityTypeMasters",
|
|
||||||
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_EntityTypeMasters", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentCategoryMasters",
|
|
||||||
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"),
|
|
||||||
EntityTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_DocumentCategoryMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentCategoryMasters_EntityTypeMasters_EntityTypeId",
|
|
||||||
column: x => x.EntityTypeId,
|
|
||||||
principalTable: "EntityTypeMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentCategoryMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentTypeMasters",
|
|
||||||
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"),
|
|
||||||
RegexExpression = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
AllowedContentType = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
MaxSizeAllowedInMB = table.Column<double>(type: "double", nullable: false),
|
|
||||||
IsValidationRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
IsMandatory = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
DocumentCategoryId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_DocumentTypeMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentTypeMasters_DocumentCategoryMasters_DocumentCategory~",
|
|
||||||
column: x => x.DocumentCategoryId,
|
|
||||||
principalTable: "DocumentCategoryMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentTypeMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentAttachments",
|
|
||||||
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"),
|
|
||||||
DocumentId = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Description = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
UploadedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
UploadedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
VerifiedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
IsVerified = table.Column<bool>(type: "tinyint(1)", nullable: true),
|
|
||||||
VerifiedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
EntityId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DocumentTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_DocumentAttachments", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_DocumentTypeMasters_DocumentTypeId",
|
|
||||||
column: x => x.DocumentTypeId,
|
|
||||||
principalTable: "DocumentTypeMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Employees_UploadedById",
|
|
||||||
column: x => x.UploadedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Employees_VerifiedById",
|
|
||||||
column: x => x.VerifiedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AttachmentTagMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DocumentTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
AttachmentId = 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_AttachmentTagMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentTagMappings_DocumentAttachments_AttachmentId",
|
|
||||||
column: x => x.AttachmentId,
|
|
||||||
principalTable: "DocumentAttachments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentTagMappings_DocumentTagMasters_DocumentTagId",
|
|
||||||
column: x => x.DocumentTagId,
|
|
||||||
principalTable: "DocumentTagMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentTagMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "AttachmentVersionMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ParentAttachmentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
Version = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ChildAttachmentId = 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_AttachmentVersionMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentVersionMappings_DocumentAttachments_ChildAttachmen~",
|
|
||||||
column: x => x.ChildAttachmentId,
|
|
||||||
principalTable: "DocumentAttachments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentVersionMappings_DocumentAttachments_ParentAttachme~",
|
|
||||||
column: x => x.ParentAttachmentId,
|
|
||||||
principalTable: "DocumentAttachments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_AttachmentVersionMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentAttachmentMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DocumentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
AttachmentId = 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_DocumentAttachmentMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_DocumentAttachments_AttachmentId",
|
|
||||||
column: x => x.AttachmentId,
|
|
||||||
principalTable: "DocumentAttachments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_Documents_DocumentId",
|
|
||||||
column: x => x.DocumentId,
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "EntityTypeMasters",
|
|
||||||
columns: new[] { "Id", "Description", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("c8fe7115-aa27-43bc-99f4-7b05fabe436e"), "Emtities related to project.", "Project Entity" },
|
|
||||||
{ new Guid("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"), "Employee related entitie", "Employee Entity" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "Features",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
|
||||||
values: new object[] { new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), "Manage Document", true, new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), "Document Management" });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
columns: new[] { "Id", "CreatedAt", "Description", "EntityTypeId", "Name", "TenantId" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8157), "Employment details along with legal IDs like passports or driver’s licenses to verify identity and work authorization.", new Guid("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"), "Employee Documents", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8150), "Project documents are formal records that outline the plans, progress, and details necessary to execute and manage a project effectively.", new Guid("c8fe7115-aa27-43bc-99f4-7b05fabe436e"), "Project Documents", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("13a1f30f-38d1-41bf-8e7a-b75189aab8e0"), "Grants a user the authority to verify the document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Verify Document" },
|
|
||||||
{ new Guid("3f6d1f67-6fa5-4b7c-b17b-018d4fe4aab8"), "Grants a user the authority to upload the document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Upload Document" },
|
|
||||||
{ new Guid("40863a13-5a66-469d-9b48-135bc5dbf486"), "Grants a user the authority to delete the document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Delete Document" },
|
|
||||||
{ new Guid("71189504-f1c8-4ca5-8db6-810497be2854"), "Grants a user the authority to view all documents related to employees and projects", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "View Document" },
|
|
||||||
{ new Guid("c423fd81-6273-4b9d-bb5e-76a0fb343833"), "Grants a user the authority to modify document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Mofify Document" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
columns: new[] { "Id", "AllowedContentType", "CreatedAt", "DocumentCategoryId", "IsActive", "IsMandatory", "IsSystem", "IsValidationRequired", "MaxSizeAllowedInMB", "Name", "RegexExpression", "TenantId" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("07ca7182-9ac0-4407-b988-59901170cb86"), "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8229), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 1.0, "Letter of Agreement", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"), "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8216), new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), true, true, true, true, 2.0, "Passport", "^[A-PR-WY][1-9]\\d\\s?\\d{4}[1-9]$", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"), "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8222), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 1.0, "Bill of Quantities (BOQ)", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"), "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8212), new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), true, true, true, true, 2.0, "Voter Card", "^[A-Z]{3}[0-9]{7}$", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"), "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8204), new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), true, true, true, true, 2.0, "Aadhaar card", "^[2-9][0-9]{11}$", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"), "application/pdf,image/vnd.dwg,application/acad", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8238), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 20.0, "Drawings", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"), "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8209), new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), true, true, true, true, 2.0, "Pan Card", "^[A-Z]{5}[0-9]{4}[A-Z]{1}$", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("7cc41c91-23cb-442b-badd-f932138d149f"), "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8235), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 1.0, "Standard Operating Procedure (SOP)", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"), "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8232), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 1.0, "Health and Safety Document", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"), "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8226), new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"), true, false, true, false, 1.0, "Work Order", null, new Guid("b3466e83-7e11-464c-b93a-daf047838b26") },
|
|
||||||
{ new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"), "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8219), new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"), true, true, true, true, 2.0, "Bank Passbook", "^\\d{9,18}$", new Guid("b3466e83-7e11-464c-b93a-daf047838b26") }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentTagMappings_AttachmentId",
|
|
||||||
table: "AttachmentTagMappings",
|
|
||||||
column: "AttachmentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentTagMappings_DocumentTagId",
|
|
||||||
table: "AttachmentTagMappings",
|
|
||||||
column: "DocumentTagId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentTagMappings_TenantId",
|
|
||||||
table: "AttachmentTagMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentVersionMappings_ChildAttachmentId",
|
|
||||||
table: "AttachmentVersionMappings",
|
|
||||||
column: "ChildAttachmentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentVersionMappings_ParentAttachmentId",
|
|
||||||
table: "AttachmentVersionMappings",
|
|
||||||
column: "ParentAttachmentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_AttachmentVersionMappings_TenantId",
|
|
||||||
table: "AttachmentVersionMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_AttachmentId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "AttachmentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_DocumentId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "DocumentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_TenantId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_DocumentTypeId",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "DocumentTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_TenantId",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_UpdatedById",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_UploadedById",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "UploadedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_VerifiedById",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "VerifiedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentCategoryMasters_EntityTypeId",
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
column: "EntityTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentCategoryMasters_TenantId",
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentTagMasters_TenantId",
|
|
||||||
table: "DocumentTagMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentTypeMasters_DocumentCategoryId",
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
column: "DocumentCategoryId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentTypeMasters_TenantId",
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AttachmentTagMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AttachmentVersionMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentAttachmentMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentTagMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentTypeMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentCategoryMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "EntityTypeMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("13a1f30f-38d1-41bf-8e7a-b75189aab8e0"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("3f6d1f67-6fa5-4b7c-b17b-018d4fe4aab8"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("40863a13-5a66-469d-9b48-135bc5dbf486"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("71189504-f1c8-4ca5-8db6-810497be2854"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("c423fd81-6273-4b9d-bb5e-76a0fb343833"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "Features",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,285 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Removed_DocumentAttachmentyMapping_And_Added : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "DocumentAttachmentMappings");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "DocumentDataId",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7895));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7887));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7995));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf,image/jpeg", new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7975) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7984));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf,image/jpeg", new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7971) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf,image/jpeg", new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7958) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8008));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf,image/jpeg", new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7966) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8004));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8000));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7991));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf,image/jpeg", new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7980) });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachments_DocumentDataId",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "DocumentDataId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Documents_DocumentDataId",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
column: "DocumentDataId",
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_DocumentAttachments_Documents_DocumentDataId",
|
|
||||||
table: "DocumentAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_DocumentAttachments_DocumentDataId",
|
|
||||||
table: "DocumentAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "DocumentDataId",
|
|
||||||
table: "DocumentAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "DocumentAttachmentMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
AttachmentId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
DocumentId = 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_DocumentAttachmentMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_DocumentAttachments_AttachmentId",
|
|
||||||
column: x => x.AttachmentId,
|
|
||||||
principalTable: "DocumentAttachments",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_Documents_DocumentId",
|
|
||||||
column: x => x.DocumentId,
|
|
||||||
principalTable: "Documents",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_DocumentAttachmentMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8157));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8150));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8229));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8216) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8222));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8212) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8204) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8238));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8209) });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8235));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8232));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8226));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
columns: new[] { "AllowedContentType", "CreatedAt" },
|
|
||||||
values: new object[] { "application/pdf", new DateTime(2025, 8, 28, 5, 50, 2, 39, DateTimeKind.Utc).AddTicks(8219) });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_AttachmentId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "AttachmentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_DocumentId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "DocumentId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_DocumentAttachmentMappings_TenantId",
|
|
||||||
table: "DocumentAttachmentMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,212 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_IsCurrentVersion_Field_In_Document_Attachment : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsCurrentVersion",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1227));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1217));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1308));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1293));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1300));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1289));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1275));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1391));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1284));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1388));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1384));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1305));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1297));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsCurrentVersion",
|
|
||||||
table: "DocumentAttachments");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7895));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7887));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7995));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7975));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7984));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7971));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7958));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8008));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7966));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8004));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(8000));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7991));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 9, 22, 46, 902, DateTimeKind.Utc).AddTicks(7980));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,237 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Modified_UpdatedAt_And_VerifiedAt_To_Nullable : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "VerifiedAt",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "UpdatedAt",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8988));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8981));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9059));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9042));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9051));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9038));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9028));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9072));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9034));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9068));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9063));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9055));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9046));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "VerifiedAt",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<DateTime>(
|
|
||||||
name: "UpdatedAt",
|
|
||||||
table: "DocumentAttachments",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
|
||||||
oldClrType: typeof(DateTime),
|
|
||||||
oldType: "datetime(6)",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1227));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1217));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1308));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1293));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1300));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1289));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1275));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1391));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1284));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1388));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1384));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1305));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 11, 44, 468, DateTimeKind.Utc).AddTicks(1297));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,211 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_New_Permission_To_Download_Document : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2627));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2617));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2718));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2700));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2710));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2695));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2684));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2731));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2690));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2727));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2722));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2714));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2705));
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
|
||||||
values: new object[] { new Guid("404373d0-860f-490e-a575-1c086ffbce1d"), "Grants a user the authority to download the document", new Guid("a8cf4331-8f04-4961-8360-a3f7c3cc7462"), true, "Download Document" });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("404373d0-860f-490e-a575-1c086ffbce1d"));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8988));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(8981));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9059));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9042));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9051));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9038));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9028));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9072));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9034));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9068));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9063));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9055));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 28, 11, 18, 55, 873, DateTimeKind.Utc).AddTicks(9046));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,264 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Project_Level_Permssion_Mapping_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ProjectLevelPermissionMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PermissionId = 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_ProjectLevelPermissionMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectLevelPermissionMappings_Employees_EmployeeId",
|
|
||||||
column: x => x.EmployeeId,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectLevelPermissionMappings_FeaturePermissions_Permission~",
|
|
||||||
column: x => x.PermissionId,
|
|
||||||
principalTable: "FeaturePermissions",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectLevelPermissionMappings_Projects_ProjectId",
|
|
||||||
column: x => x.ProjectId,
|
|
||||||
principalTable: "Projects",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectLevelPermissionMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectLevelPermissionMappings_EmployeeId",
|
|
||||||
table: "ProjectLevelPermissionMappings",
|
|
||||||
column: "EmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectLevelPermissionMappings_PermissionId",
|
|
||||||
table: "ProjectLevelPermissionMappings",
|
|
||||||
column: "PermissionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectLevelPermissionMappings_ProjectId",
|
|
||||||
table: "ProjectLevelPermissionMappings",
|
|
||||||
column: "ProjectId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectLevelPermissionMappings_TenantId",
|
|
||||||
table: "ProjectLevelPermissionMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ProjectLevelPermissionMappings");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2627));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2617));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2718));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2700));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2710));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2695));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2684));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2731));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2690));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2727));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2722));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2714));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 8, 30, 4, 55, 10, 359, DateTimeKind.Utc).AddTicks(2705));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,268 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_IsAttachmentRequried_Parameter_In_ExpensesTypeMaster_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsAttachmentRequried",
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 12, 7, 6, 13, 429, DateTimeKind.Utc).AddTicks(3323));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 12, 7, 6, 13, 429, DateTimeKind.Utc).AddTicks(3316));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("1e2d697a-76b4-4be8-bc66-87144561a1a0"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2de53163-0dbd-404b-8e60-1b02e6b4886a"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: false);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("4842fa61-64eb-4241-aebd-8282065af9f9"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("52484820-1b54-4865-8f0f-baa2b1d339b9"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5e0c6227-d49d-41ff-9f1f-781f0aee2469"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("77013784-9324-4d8b-bd36-d6f928e68942"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("dd120bc4-ab0a-45ba-8450-5cd45ff221ca"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: false);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ExpensesTypeMaster",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("fc59eb90-98ea-481c-b421-54bfa9e42d8f"),
|
|
||||||
column: "IsAttachmentRequried",
|
|
||||||
value: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsAttachmentRequried",
|
|
||||||
table: "ExpensesTypeMaster");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,757 +0,0 @@
|
|||||||
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_Tables_Related_To_Organizations : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ActivityMasters",
|
|
||||||
keyColumn: "UnitOfMeasurement",
|
|
||||||
keyValue: null,
|
|
||||||
column: "UnitOfMeasurement",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UnitOfMeasurement",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "ActivityMasters",
|
|
||||||
keyColumn: "ActivityName",
|
|
||||||
keyValue: null,
|
|
||||||
column: "ActivityName",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ActivityName",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "ActivityGroupId",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsSystem",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GlobalServiceMasters",
|
|
||||||
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_GlobalServiceMasters", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Organizations",
|
|
||||||
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"),
|
|
||||||
Email = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ContactPerson = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
Address = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ContactNumber = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
SPRID = table.Column<double>(type: "double", nullable: false),
|
|
||||||
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
CreatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
||||||
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Organizations", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_CreatedById",
|
|
||||||
column: x => x.CreatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_UpdatedById",
|
|
||||||
column: x => x.UpdatedById,
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrgTypeMasters",
|
|
||||||
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")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrgTypeMasters", x => x.Id);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ServiceMasters",
|
|
||||||
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"),
|
|
||||||
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ServiceMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ServiceMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GlobalActivityGroupMasters",
|
|
||||||
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"),
|
|
||||||
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_GlobalActivityGroupMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GlobalActivityGroupMasters_GlobalServiceMasters_ServiceId",
|
|
||||||
column: x => x.ServiceId,
|
|
||||||
principalTable: "GlobalServiceMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "OrgServiceMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_OrgServiceMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrgServiceMappings_GlobalServiceMasters_ServiceId",
|
|
||||||
column: x => x.ServiceId,
|
|
||||||
principalTable: "GlobalServiceMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_OrgServiceMappings_Organizations_OrganizationId",
|
|
||||||
column: x => x.OrganizationId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "TenantOrgMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
SPRID = table.Column<double>(type: "double", nullable: false),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
ReassignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_TenantOrgMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantOrgMappings_Organizations_OrganizationId",
|
|
||||||
column: x => x.OrganizationId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_TenantOrgMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ActivityGroupMasters",
|
|
||||||
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"),
|
|
||||||
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
IsSystem = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ActivityGroupMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ActivityGroupMasters_ServiceMasters_ServiceId",
|
|
||||||
column: x => x.ServiceId,
|
|
||||||
principalTable: "ServiceMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ActivityGroupMasters_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ProjectServiceMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
PlannedStartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
PlannedEndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
ActualStartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
ActualEndDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ProjectServiceMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectServiceMappings_Projects_ProjectId",
|
|
||||||
column: x => x.ProjectId,
|
|
||||||
principalTable: "Projects",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectServiceMappings_ServiceMasters_ServiceId",
|
|
||||||
column: x => x.ServiceId,
|
|
||||||
principalTable: "ServiceMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectServiceMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "GlobalActivityMasters",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ActivityName = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
UnitOfMeasurement = table.Column<string>(type: "longtext", nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
ActivityGroupId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_GlobalActivityMasters", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_GlobalActivityMasters_GlobalActivityGroupMasters_ActivityGro~",
|
|
||||||
column: x => x.ActivityGroupId,
|
|
||||||
principalTable: "GlobalActivityGroupMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "ProjectOrgMappings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
OrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ParentOrganizationId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
ProjectServiceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
OrganizationTypeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
||||||
AssignedDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
CompletionDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
||||||
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_ProjectOrgMappings", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_OrgTypeMasters_OrganizationTypeId",
|
|
||||||
column: x => x.OrganizationTypeId,
|
|
||||||
principalTable: "OrgTypeMasters",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_Organizations_OrganizationId",
|
|
||||||
column: x => x.OrganizationId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_Organizations_ParentOrganizationId",
|
|
||||||
column: x => x.ParentOrganizationId,
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_ProjectServiceMappings_ProjectServiceId",
|
|
||||||
column: x => x.ProjectServiceId,
|
|
||||||
principalTable: "ProjectServiceMappings",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_Tenants_TenantId",
|
|
||||||
column: x => x.TenantId,
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc));
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "OrgTypeMasters",
|
|
||||||
columns: new[] { "Id", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("5ee49bcd-b6d3-482f-9aaf-484afe04abec"), "Service Provider" },
|
|
||||||
{ new Guid("743806fe-d991-4079-b223-e4e2da44f435"), "Tenant" },
|
|
||||||
{ new Guid("a283356a-9b02-4029-afb7-e65c703efdd4"), "Sub-Contractor" },
|
|
||||||
{ new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"), "PMC" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "Organizations",
|
|
||||||
columns: new[] { "Id", "Address", "ContactNumber", "ContactPerson", "CreatedAt", "CreatedById", "Email", "IsActive", "Name", "SPRID", "UpdatedAt", "UpdatedById" },
|
|
||||||
values: new object[] { new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"), "2nd Floor, Fullora Building, Tejas CHS, behind Kothrud Stand, Tejas Society, Dahanukar Colony, Kothrud, Pune, Maharashtra 411038", "123456789", "Admin", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "admin@marcoaiot.com", true, "MarcoBMS", 5400.0, null, null });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ActivityMasters_ActivityGroupId",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
column: "ActivityGroupId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ActivityGroupMasters_ServiceId",
|
|
||||||
table: "ActivityGroupMasters",
|
|
||||||
column: "ServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ActivityGroupMasters_TenantId",
|
|
||||||
table: "ActivityGroupMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_GlobalActivityGroupMasters_ServiceId",
|
|
||||||
table: "GlobalActivityGroupMasters",
|
|
||||||
column: "ServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_GlobalActivityMasters_ActivityGroupId",
|
|
||||||
table: "GlobalActivityMasters",
|
|
||||||
column: "ActivityGroupId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Organizations_CreatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Organizations_UpdatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrgServiceMappings_OrganizationId",
|
|
||||||
table: "OrgServiceMappings",
|
|
||||||
column: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OrgServiceMappings_ServiceId",
|
|
||||||
table: "OrgServiceMappings",
|
|
||||||
column: "ServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_OrganizationId",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_OrganizationTypeId",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "OrganizationTypeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_ParentOrganizationId",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "ParentOrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_ProjectServiceId",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "ProjectServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_TenantId",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectServiceMappings_ProjectId",
|
|
||||||
table: "ProjectServiceMappings",
|
|
||||||
column: "ProjectId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectServiceMappings_ServiceId",
|
|
||||||
table: "ProjectServiceMappings",
|
|
||||||
column: "ServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectServiceMappings_TenantId",
|
|
||||||
table: "ProjectServiceMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ServiceMasters_TenantId",
|
|
||||||
table: "ServiceMasters",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantOrgMappings_OrganizationId",
|
|
||||||
table: "TenantOrgMappings",
|
|
||||||
column: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantOrgMappings_TenantId",
|
|
||||||
table: "TenantOrgMappings",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ActivityMasters_ActivityGroupMasters_ActivityGroupId",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
column: "ActivityGroupId",
|
|
||||||
principalTable: "ActivityGroupMasters",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_ActivityMasters_ActivityGroupMasters_ActivityGroupId",
|
|
||||||
table: "ActivityMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ActivityGroupMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GlobalActivityMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrgServiceMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ProjectOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "TenantOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GlobalActivityGroupMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "OrgTypeMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ProjectServiceMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Organizations");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "GlobalServiceMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "ServiceMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_ActivityMasters_ActivityGroupId",
|
|
||||||
table: "ActivityMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ActivityGroupId",
|
|
||||||
table: "ActivityMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsSystem",
|
|
||||||
table: "ActivityMasters");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UnitOfMeasurement",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ActivityName",
|
|
||||||
table: "ActivityMasters",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d9fb9cf-db53-476b-a452-492e88e2b51f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6233));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentCategoryMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("cfbff269-072b-477a-b48b-72cdc57dd1d3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6226));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("07ca7182-9ac0-4407-b988-59901170cb86"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6307));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("16c40b80-c207-4a0c-a4d3-381414afe35a"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6290));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("260abd7e-c96d-4ae4-a29b-9b5bb5d24ebd"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6298));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("2d1d7441-46a8-425e-9395-94d0956f8e91"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6286));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("336225ac-67f3-4e14-ba7a-8fad03cf2832"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6275));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("5668de00-5d84-47f7-b9b5-7fefd1219f05"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6319));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6344393b-9bb1-45f8-b620-9f6e279d012c"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6282));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7cc41c91-23cb-442b-badd-f932138d149f"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6314));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("846e89a9-5735-45ec-a21d-c97f85a94ada"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6311));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("a1a190ba-c4a8-432f-b26d-1231ca1d44bc"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6302));
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "DocumentTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("f76d8215-d399-4f0e-b414-12e427f50be3"),
|
|
||||||
column: "CreatedAt",
|
|
||||||
value: new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc).AddTicks(6295));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,77 +0,0 @@
|
|||||||
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_IsActive_In_ServiceMaster : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ServiceMasters",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ActivityGroupMasters",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "Features",
|
|
||||||
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
|
|
||||||
values: new object[] { new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), "Managing all organization related rights", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Organization Management" });
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"), "Allow user to create new organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Add Organization" },
|
|
||||||
{ new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"), "Allow the user to view information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "View Organization" },
|
|
||||||
{ new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"), "Allow the user to update the basic information of the organization", new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"), true, "Edit Organization" }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("068cb3c1-49c5-4746-9f29-1fce16e820ac"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("7a6cf830-0008-4e03-b31d-0d050cb634f4"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "FeaturePermissions",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("c1ae1363-ab8a-4bd9-a9d1-8c2c6083873a"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "Features",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("6d4c82d6-dbce-48ab-b8b8-f785f4d8c914"));
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ServiceMasters");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ActivityGroupMasters");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,136 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Updated_EMployee_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Employees_JobRoles_JobRoleId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "AadharNumber",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PanNumber",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "RoleId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "JobRoleId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Employees",
|
|
||||||
keyColumn: "FirstName",
|
|
||||||
keyValue: null,
|
|
||||||
column: "FirstName",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "FirstName",
|
|
||||||
table: "Employees",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "HasApplicationAccess",
|
|
||||||
table: "Employees",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Employees_JobRoles_JobRoleId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "JobRoleId",
|
|
||||||
principalTable: "JobRoles",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Employees_JobRoles_JobRoleId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "HasApplicationAccess",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "JobRoleId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "FirstName",
|
|
||||||
table: "Employees",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "AadharNumber",
|
|
||||||
table: "Employees",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PanNumber",
|
|
||||||
table: "Employees",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "RoleId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Employees_JobRoles_JobRoleId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "JobRoleId",
|
|
||||||
principalTable: "JobRoles",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,70 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Organization_In_Employee_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_CreatedById",
|
|
||||||
table: "Organizations");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_UpdatedById",
|
|
||||||
table: "Organizations");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Organizations_CreatedById",
|
|
||||||
table: "Organizations");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Organizations_UpdatedById",
|
|
||||||
table: "Organizations");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "OrganizationId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "OrganizationId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Organizations_CreatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "CreatedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Organizations_UpdatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "UpdatedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_CreatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "CreatedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Organizations_Employees_UpdatedById",
|
|
||||||
table: "Organizations",
|
|
||||||
column: "UpdatedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,39 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Organization_In_Employee_Table_As_Forgin_Key : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Employees_OrganizationId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Employees_Organizations_OrganizationId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "OrganizationId",
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Employees_Organizations_OrganizationId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Employees_OrganizationId",
|
|
||||||
table: "Employees");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_IsPrimary_Parameter_In_Employee_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsPrimary",
|
|
||||||
table: "Employees",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsPrimary",
|
|
||||||
table: "Employees");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,69 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Organization_In_Tenant_Table_As_Forgin_Key : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "AspNetUsers");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "OrganizationId",
|
|
||||||
table: "Tenants",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Tenants",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("b3466e83-7e11-464c-b93a-daf047838b26"),
|
|
||||||
column: "OrganizationId",
|
|
||||||
value: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"));
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Tenants_OrganizationId",
|
|
||||||
table: "Tenants",
|
|
||||||
column: "OrganizationId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Tenants_Organizations_OrganizationId",
|
|
||||||
table: "Tenants",
|
|
||||||
column: "OrganizationId",
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Tenants_Organizations_OrganizationId",
|
|
||||||
table: "Tenants");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Tenants_OrganizationId",
|
|
||||||
table: "Tenants");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "OrganizationId",
|
|
||||||
table: "Tenants");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "AspNetUsers",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,136 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Promoter_And_PMC_In_Project_Table_As_Forgin_Key : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Employees_Tenants_TenantId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PMCId",
|
|
||||||
table: "Projects",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "PromoterId",
|
|
||||||
table: "Projects",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Projects",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"),
|
|
||||||
columns: new[] { "PMCId", "PromoterId" },
|
|
||||||
values: new object[] { new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"), new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea") });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Projects_PMCId",
|
|
||||||
table: "Projects",
|
|
||||||
column: "PMCId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Projects_PromoterId",
|
|
||||||
table: "Projects",
|
|
||||||
column: "PromoterId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Employees_Tenants_TenantId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Projects_Organizations_PMCId",
|
|
||||||
table: "Projects",
|
|
||||||
column: "PMCId",
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Projects_Organizations_PromoterId",
|
|
||||||
table: "Projects",
|
|
||||||
column: "PromoterId",
|
|
||||||
principalTable: "Organizations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Employees_Tenants_TenantId",
|
|
||||||
table: "Employees");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Projects_Organizations_PMCId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Projects_Organizations_PromoterId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Projects_PMCId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Projects_PromoterId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PMCId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PromoterId",
|
|
||||||
table: "Projects");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "Employees",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Employees_Tenants_TenantId",
|
|
||||||
table: "Employees",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_IsActive_In_ProjectServiceMapping_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ProjectServiceMappings",
|
|
||||||
type: "tinyint(1)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "IsActive",
|
|
||||||
table: "ProjectServiceMappings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,85 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Removed_TenantId_From_MPIN_And_OTP : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_MPINDetails_Tenants_TenantId",
|
|
||||||
table: "MPINDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_OTPDetails_Tenants_TenantId",
|
|
||||||
table: "OTPDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_OTPDetails_TenantId",
|
|
||||||
table: "OTPDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_MPINDetails_TenantId",
|
|
||||||
table: "MPINDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "OTPDetails");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "MPINDetails");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "OTPDetails",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "TenantId",
|
|
||||||
table: "MPINDetails",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_OTPDetails_TenantId",
|
|
||||||
table: "OTPDetails",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_MPINDetails_TenantId",
|
|
||||||
table: "MPINDetails",
|
|
||||||
column: "TenantId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_MPINDetails_Tenants_TenantId",
|
|
||||||
table: "MPINDetails",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_OTPDetails_Tenants_TenantId",
|
|
||||||
table: "OTPDetails",
|
|
||||||
column: "TenantId",
|
|
||||||
principalTable: "Tenants",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,68 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Service_FK_In_ProjectAllocation : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "ServiceId",
|
|
||||||
table: "ProjectAllocations",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "logoImage",
|
|
||||||
table: "Organizations",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Organizations",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("4e3a6d31-c640-40f7-8d67-6c109fcdb9ea"),
|
|
||||||
column: "logoImage",
|
|
||||||
value: null);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectAllocations_ServiceId",
|
|
||||||
table: "ProjectAllocations",
|
|
||||||
column: "ServiceId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ProjectAllocations_ServiceMasters_ServiceId",
|
|
||||||
table: "ProjectAllocations",
|
|
||||||
column: "ServiceId",
|
|
||||||
principalTable: "ServiceMasters",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_ProjectAllocations_ServiceMasters_ServiceId",
|
|
||||||
table: "ProjectAllocations");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_ProjectAllocations_ServiceId",
|
|
||||||
table: "ProjectAllocations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ServiceId",
|
|
||||||
table: "ProjectAllocations");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "logoImage",
|
|
||||||
table: "Organizations");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,84 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Assigned_By_In_Mapping_Tables : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "AssignedById",
|
|
||||||
table: "TenantOrgMappings",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("08dd8b35-d98b-44f1-896d-12aec3f035aa"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "AssignedById",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("08dd8b35-d98b-44f1-896d-12aec3f035aa"),
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_TenantOrgMappings_AssignedById",
|
|
||||||
table: "TenantOrgMappings",
|
|
||||||
column: "AssignedById");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_AssignedById",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "AssignedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_Employees_AssignedById",
|
|
||||||
table: "ProjectOrgMappings",
|
|
||||||
column: "AssignedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantOrgMappings_Employees_AssignedById",
|
|
||||||
table: "TenantOrgMappings",
|
|
||||||
column: "AssignedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_ProjectOrgMappings_Employees_AssignedById",
|
|
||||||
table: "ProjectOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantOrgMappings_Employees_AssignedById",
|
|
||||||
table: "TenantOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_TenantOrgMappings_AssignedById",
|
|
||||||
table: "TenantOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_ProjectOrgMappings_AssignedById",
|
|
||||||
table: "ProjectOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "AssignedById",
|
|
||||||
table: "TenantOrgMappings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "AssignedById",
|
|
||||||
table: "ProjectOrgMappings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,40 +0,0 @@
|
|||||||
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 Deleted_Organization_Types : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "OrgTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("743806fe-d991-4079-b223-e4e2da44f435"));
|
|
||||||
|
|
||||||
migrationBuilder.DeleteData(
|
|
||||||
table: "OrgTypeMasters",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "OrgTypeMasters",
|
|
||||||
columns: new[] { "Id", "Name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ new Guid("743806fe-d991-4079-b223-e4e2da44f435"), "Tenant" },
|
|
||||||
{ new Guid("b1877a3b-8832-47b1-bbe3-dc7e98672f49"), "PMC" }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,92 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Forgin_Key_For_Approver : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_EmployeeID",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "EmployeeID",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "EmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "ApprovedBy",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "ApprovedById");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Attendes_EmployeeID",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "IX_Attendes_EmployeeId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Attendes_ApprovedById",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "ApprovedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_ApprovedById",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "ApprovedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_EmployeeId",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "EmployeeId",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_ApprovedById",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_EmployeeId",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Attendes_ApprovedById",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "EmployeeId",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "EmployeeID");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "ApprovedById",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "ApprovedBy");
|
|
||||||
|
|
||||||
migrationBuilder.RenameIndex(
|
|
||||||
name: "IX_Attendes_EmployeeId",
|
|
||||||
table: "Attendes",
|
|
||||||
newName: "IX_Attendes_EmployeeID");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_EmployeeID",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "EmployeeID",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_ExpenceUID_In_Expense_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "ExpenseUId",
|
|
||||||
table: "Expenses",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ExpenseUId",
|
|
||||||
table: "Expenses");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,70 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Added_Requested_In_Attendance_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "ApprovedAt",
|
|
||||||
table: "Attendes",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "RequestedAt",
|
|
||||||
table: "Attendes",
|
|
||||||
type: "datetime(6)",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<Guid>(
|
|
||||||
name: "RequestedById",
|
|
||||||
table: "Attendes",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Attendes_RequestedById",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "RequestedById");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_RequestedById",
|
|
||||||
table: "Attendes",
|
|
||||||
column: "RequestedById",
|
|
||||||
principalTable: "Employees",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Attendes_Employees_RequestedById",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Attendes_RequestedById",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ApprovedAt",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "RequestedAt",
|
|
||||||
table: "Attendes");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "RequestedById",
|
|
||||||
table: "Attendes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,6 @@
|
|||||||
using Marco.Pms.Model.MongoDBModels.Employees;
|
using Marco.Pms.Model.MongoDBModels.Employees;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
|
|
||||||
namespace Marco.Pms.Helpers.CacheHelper
|
namespace Marco.Pms.Helpers.CacheHelper
|
||||||
@ -9,32 +8,26 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
public class EmployeeCache
|
public class EmployeeCache
|
||||||
{
|
{
|
||||||
private readonly IMongoCollection<EmployeePermissionMongoDB> _collection;
|
private readonly IMongoCollection<EmployeePermissionMongoDB> _collection;
|
||||||
private readonly ILogger<EmployeeCache> _logger;
|
public EmployeeCache(IConfiguration configuration)
|
||||||
|
|
||||||
public EmployeeCache(IConfiguration configuration, ILogger<EmployeeCache> logger)
|
|
||||||
{
|
{
|
||||||
_logger = logger;
|
|
||||||
var connectionString = configuration["MongoDB:ConnectionString"];
|
var connectionString = configuration["MongoDB:ConnectionString"];
|
||||||
var mongoUrl = new MongoUrl(connectionString);
|
var mongoUrl = new MongoUrl(connectionString);
|
||||||
var client = new MongoClient(mongoUrl); // Your MongoDB connection string
|
var client = new MongoClient(mongoUrl); // Your MongoDB connection string
|
||||||
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
||||||
_collection = mongoDB.GetCollection<EmployeePermissionMongoDB>("EmployeeProfile");
|
_collection = mongoDB.GetCollection<EmployeePermissionMongoDB>("EmployeeProfile");
|
||||||
}
|
}
|
||||||
public async Task<bool> AddApplicationRoleToCache(Guid employeeId, List<string> newRoleIds, List<string> newPermissionIds, Guid tenantId)
|
public async Task<bool> AddApplicationRoleToCache(Guid employeeId, List<string> newRoleIds, List<string> newPermissionIds)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 2. Perform database queries concurrently for better performance.
|
// 2. Perform database queries concurrently for better performance.
|
||||||
var employeeIdString = employeeId.ToString();
|
var employeeIdString = employeeId.ToString();
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
// 5. Build a single, efficient update operation.
|
// 5. Build a single, efficient update operation.
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.AddToSetEach(e => e.ApplicationRoleIds, newRoleIds)
|
.AddToSetEach(e => e.ApplicationRoleIds, newRoleIds)
|
||||||
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
||||||
.Set(r => r.TenantId, tenantIdString)
|
|
||||||
.AddToSetEach(e => e.PermissionIds, newPermissionIds);
|
.AddToSetEach(e => e.PermissionIds, newPermissionIds);
|
||||||
|
|
||||||
var options = new UpdateOptions { IsUpsert = true };
|
var options = new UpdateOptions { IsUpsert = true };
|
||||||
@ -47,17 +40,14 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
// The operation is successful if an existing document was modified OR a new one was created.
|
// The operation is successful if an existing document was modified OR a new one was created.
|
||||||
return result.IsAcknowledged && (result.ModifiedCount > 0 || result.UpsertedId != null);
|
return result.IsAcknowledged && (result.ModifiedCount > 0 || result.UpsertedId != null);
|
||||||
}
|
}
|
||||||
public async Task<bool> AddProjectsToCache(Guid employeeId, List<Guid> projectIds, Guid tenantId)
|
public async Task<bool> AddProjectsToCache(Guid employeeId, List<Guid> projectIds)
|
||||||
{
|
{
|
||||||
var newprojectIds = projectIds.Select(p => p.ToString()).ToList();
|
var newprojectIds = projectIds.Select(p => p.ToString()).ToList();
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
.Set(r => r.ExpireAt, DateTime.UtcNow.Date.AddDays(1))
|
||||||
.Set(r => r.TenantId, tenantIdString)
|
|
||||||
.AddToSetEach(e => e.ProjectIds, newprojectIds);
|
.AddToSetEach(e => e.ProjectIds, newprojectIds);
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update, new UpdateOptions { IsUpsert = true });
|
var result = await _collection.UpdateOneAsync(filter, update, new UpdateOptions { IsUpsert = true });
|
||||||
@ -68,12 +58,10 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
await InitializeCollectionAsync();
|
await InitializeCollectionAsync();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<List<Guid>> GetProjectsFromCache(Guid employeeId, Guid tenantId)
|
public async Task<List<Guid>> GetProjectsFromCache(Guid employeeId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var result = await _collection
|
var result = await _collection
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -87,12 +75,10 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return projectIds;
|
return projectIds;
|
||||||
}
|
}
|
||||||
public async Task<List<Guid>> GetPermissionsFromCache(Guid employeeId, Guid tenantId)
|
public async Task<List<Guid>> GetPermissionsFromCache(Guid employeeId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var result = await _collection
|
var result = await _collection
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -106,13 +92,10 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return permissionIds;
|
return permissionIds;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllProjectIdsFromCache(Guid employeeId, Guid tenantId)
|
public async Task<bool> ClearAllProjectIdsFromCache(Guid employeeId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(e => e.ProjectIds, new List<string>());
|
.Set(e => e.ProjectIds, new List<string>());
|
||||||
@ -138,25 +121,18 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllProjectIdsByPermissionIdFromCache(Guid permissionId, Guid tenantId)
|
public async Task<bool> ClearAllProjectIdsByPermissionIdFromCache(Guid permissionId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.AnyEq(e => e.PermissionIds, permissionId.ToString());
|
var filter = Builders<EmployeePermissionMongoDB>.Filter.AnyEq(e => e.PermissionIds, permissionId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update.Set(e => e.ProjectIds, new List<string>());
|
var update = Builders<EmployeePermissionMongoDB>.Update.Set(e => e.ProjectIds, new List<string>());
|
||||||
|
|
||||||
var result = await _collection.UpdateManyAsync(filter, update).ConfigureAwait(false);
|
var result = await _collection.UpdateManyAsync(filter, update).ConfigureAwait(false);
|
||||||
return result.IsAcknowledged && result.ModifiedCount > 0;
|
return result.IsAcknowledged && result.ModifiedCount > 0;
|
||||||
}
|
}
|
||||||
public async Task<bool> RemoveRoleIdFromCache(Guid employeeId, Guid roleId, Guid tenantId)
|
public async Task<bool> RemoveRoleIdFromCache(Guid employeeId, Guid roleId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Pull(e => e.ApplicationRoleIds, roleId.ToString());
|
.Pull(e => e.ApplicationRoleIds, roleId.ToString());
|
||||||
@ -171,13 +147,10 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllPermissionIdsByEmployeeIDFromCache(Guid employeeId, Guid tenantId)
|
public async Task<bool> ClearAllPermissionIdsByEmployeeIDFromCache(Guid employeeId)
|
||||||
{
|
{
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
var filter = Builders<EmployeePermissionMongoDB>.Filter
|
||||||
.Eq(e => e.Id, employeeId.ToString());
|
.Eq(e => e.Id, employeeId.ToString());
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var update = Builders<EmployeePermissionMongoDB>.Update
|
var update = Builders<EmployeePermissionMongoDB>.Update
|
||||||
.Set(e => e.PermissionIds, new List<string>());
|
.Set(e => e.PermissionIds, new List<string>());
|
||||||
@ -212,70 +185,6 @@ namespace Marco.Pms.Helpers.CacheHelper
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public async Task<bool> ClearAllEmployeesFromCacheByOnlyEmployeeId(Guid employeeId)
|
|
||||||
{
|
|
||||||
var employeeIdString = employeeId.ToString();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.Id, employeeIdString);
|
|
||||||
|
|
||||||
var result = await _collection.DeleteManyAsync(filter);
|
|
||||||
|
|
||||||
if (result.DeletedCount == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error occured while deleting employee profile");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public async Task<bool> ClearAllEmployeesFromCacheByTenantId(Guid tenantId)
|
|
||||||
{
|
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var result = await _collection.DeleteManyAsync(filter);
|
|
||||||
|
|
||||||
if (result.DeletedCount == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error occured while deleting employee profile");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public async Task<bool> ClearAllEmployeesFromCacheByEmployeeIds(List<string> employeeIds, Guid tenantId)
|
|
||||||
{
|
|
||||||
var tenantIdString = tenantId.ToString();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<EmployeePermissionMongoDB>.Filter.In(x => x.Id, employeeIds);
|
|
||||||
filter &= Builders<EmployeePermissionMongoDB>.Filter.Eq(e => e.TenantId, tenantIdString);
|
|
||||||
|
|
||||||
var result = await _collection.DeleteManyAsync(filter);
|
|
||||||
|
|
||||||
if (result.DeletedCount == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error occured while deleting employee profile");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// A private method to handle the one-time setup of the collection's indexes.
|
// A private method to handle the one-time setup of the collection's indexes.
|
||||||
private async Task InitializeCollectionAsync()
|
private async Task InitializeCollectionAsync()
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
using Marco.Pms.DataAccess.Data;
|
using Marco.Pms.DataAccess.Data;
|
||||||
using Marco.Pms.Model.Master;
|
using Marco.Pms.Model.Master;
|
||||||
using Marco.Pms.Model.MongoDBModels;
|
|
||||||
using Marco.Pms.Model.MongoDBModels.Masters;
|
using Marco.Pms.Model.MongoDBModels.Masters;
|
||||||
using Marco.Pms.Model.MongoDBModels.Project;
|
using Marco.Pms.Model.MongoDBModels.Project;
|
||||||
using Marco.Pms.Model.OrganizationModel;
|
|
||||||
using Marco.Pms.Model.Projects;
|
using Marco.Pms.Model.Projects;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
@ -57,7 +55,7 @@ namespace Marco.Pms.Helpers
|
|||||||
var indexModel = new CreateIndexModel<ProjectMongoDB>(indexKeys, indexOptions);
|
var indexModel = new CreateIndexModel<ProjectMongoDB>(indexKeys, indexOptions);
|
||||||
await _projectCollection.Indexes.CreateOneAsync(indexModel);
|
await _projectCollection.Indexes.CreateOneAsync(indexModel);
|
||||||
}
|
}
|
||||||
public async Task<bool> UpdateProjectDetailsOnlyToCache(Project project, StatusMaster projectStatus, Organization promotor, Organization pmc)
|
public async Task<bool> UpdateProjectDetailsOnlyToCache(Project project, StatusMaster projectStatus)
|
||||||
{
|
{
|
||||||
// Build the update definition
|
// Build the update definition
|
||||||
var updates = Builders<ProjectMongoDB>.Update.Combine(
|
var updates = Builders<ProjectMongoDB>.Update.Combine(
|
||||||
@ -69,26 +67,6 @@ namespace Marco.Pms.Helpers
|
|||||||
Id = projectStatus.Id.ToString(),
|
Id = projectStatus.Id.ToString(),
|
||||||
Status = projectStatus.Status
|
Status = projectStatus.Status
|
||||||
}),
|
}),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.Promoter, new OrganizationMongoDB
|
|
||||||
{
|
|
||||||
Id = promotor.Id.ToString(),
|
|
||||||
Name = promotor.Name,
|
|
||||||
ContactPerson = promotor.ContactPerson,
|
|
||||||
Email = promotor.Email,
|
|
||||||
Address = promotor.Address,
|
|
||||||
ContactNumber = promotor.ContactNumber,
|
|
||||||
SPRID = promotor.SPRID
|
|
||||||
}),
|
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.PMC, new OrganizationMongoDB
|
|
||||||
{
|
|
||||||
Id = pmc.Id.ToString(),
|
|
||||||
Name = pmc.Name,
|
|
||||||
ContactPerson = pmc.ContactPerson,
|
|
||||||
Email = pmc.Email,
|
|
||||||
Address = promotor.Address,
|
|
||||||
ContactNumber = promotor.ContactNumber,
|
|
||||||
SPRID = promotor.SPRID
|
|
||||||
}),
|
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.StartDate, project.StartDate),
|
Builders<ProjectMongoDB>.Update.Set(r => r.StartDate, project.StartDate),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.EndDate, project.EndDate),
|
Builders<ProjectMongoDB>.Update.Set(r => r.EndDate, project.EndDate),
|
||||||
Builders<ProjectMongoDB>.Update.Set(r => r.ContactPerson, project.ContactPerson)
|
Builders<ProjectMongoDB>.Update.Set(r => r.ContactPerson, project.ContactPerson)
|
||||||
@ -429,19 +407,10 @@ namespace Marco.Pms.Helpers
|
|||||||
|
|
||||||
#region=================================================================== WorkItem Cache Helper ===================================================================
|
#region=================================================================== WorkItem Cache Helper ===================================================================
|
||||||
|
|
||||||
public async Task<List<WorkItemMongoDB>> GetWorkItemsByWorkAreaIdsFromCache(List<Guid> workAreaIds, List<Guid> serviceIds)
|
public async Task<List<WorkItemMongoDB>> GetWorkItemsByWorkAreaIdsFromCache(List<Guid> workAreaIds)
|
||||||
{
|
{
|
||||||
var stringWorkAreaIds = workAreaIds.Select(wa => wa.ToString()).ToList();
|
var stringWorkAreaIds = workAreaIds.Select(wa => wa.ToString()).ToList();
|
||||||
|
var filter = Builders<WorkItemMongoDB>.Filter.In(w => w.WorkAreaId, stringWorkAreaIds);
|
||||||
var filterBuilder = Builders<WorkItemMongoDB>.Filter;
|
|
||||||
var filter = filterBuilder.Empty;
|
|
||||||
|
|
||||||
filter &= filterBuilder.In(w => w.WorkAreaId, stringWorkAreaIds);
|
|
||||||
if (serviceIds.Any())
|
|
||||||
{
|
|
||||||
var stringServiceIds = serviceIds.Select(s => s.ToString()).ToList();
|
|
||||||
filter &= filterBuilder.In(w => w.ActivityMaster!.ActivityGroupMaster!.Service!.Id, stringServiceIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
var workItems = await _taskCollection // replace with your actual collection name
|
var workItems = await _taskCollection // replace with your actual collection name
|
||||||
.Find(filter)
|
.Find(filter)
|
||||||
@ -480,17 +449,9 @@ namespace Marco.Pms.Helpers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public async Task<List<WorkItemMongoDB>> GetWorkItemDetailsByWorkAreaFromCache(Guid workAreaId, List<Guid> serviceIds)
|
public async Task<List<WorkItemMongoDB>> GetWorkItemDetailsByWorkAreaFromCache(Guid workAreaId)
|
||||||
{
|
{
|
||||||
var filterBuilder = Builders<WorkItemMongoDB>.Filter;
|
var filter = Builders<WorkItemMongoDB>.Filter.Eq(p => p.WorkAreaId, workAreaId.ToString());
|
||||||
var filter = filterBuilder.Empty;
|
|
||||||
|
|
||||||
filter &= filterBuilder.Eq(p => p.WorkAreaId, workAreaId.ToString());
|
|
||||||
if (serviceIds.Any())
|
|
||||||
{
|
|
||||||
var stringServiceIds = serviceIds.Select(s => s.ToString()).ToList();
|
|
||||||
filter &= filterBuilder.In(w => w.ActivityMaster!.ActivityGroupMaster!.Service!.Id, stringServiceIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
var options = new UpdateOptions { IsUpsert = true };
|
var options = new UpdateOptions { IsUpsert = true };
|
||||||
var workItems = await _taskCollection
|
var workItems = await _taskCollection
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
using Marco.Pms.Model.TenantModels.MongoDBModel;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MongoDB.Driver;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Helpers.Utility
|
|
||||||
{
|
|
||||||
public class FeatureDetailsHelper
|
|
||||||
{
|
|
||||||
private readonly IMongoCollection<FeatureDetails> _collection;
|
|
||||||
private readonly ILogger<FeatureDetailsHelper> _logger;
|
|
||||||
public FeatureDetailsHelper(IConfiguration configuration, ILogger<FeatureDetailsHelper> logger)
|
|
||||||
{
|
|
||||||
_logger = logger;
|
|
||||||
var connectionString = configuration["MongoDB:ModificationConnectionString"];
|
|
||||||
var mongoUrl = new MongoUrl(connectionString);
|
|
||||||
var client = new MongoClient(mongoUrl); // Your MongoDB connection string
|
|
||||||
var mongoDB = client.GetDatabase(mongoUrl.DatabaseName); // Your MongoDB Database name
|
|
||||||
_collection = mongoDB.GetCollection<FeatureDetails>("FeatureDetails");
|
|
||||||
}
|
|
||||||
public async Task<FeatureDetails?> GetFeatureDetails(Guid Id)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<FeatureDetails>.Filter.Eq(e => e.Id, Id);
|
|
||||||
|
|
||||||
var result = await _collection
|
|
||||||
.Find(filter)
|
|
||||||
.FirstOrDefaultAsync();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while fetchig features for subscription plan");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public async Task<bool> AddFeatureDetails(FeatureDetails featureDetails)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await _collection.InsertOneAsync(featureDetails);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while fetchig features for subscription plan");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,224 +0,0 @@
|
|||||||
using Marco.Pms.Model.AppMenu;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Driver;
|
|
||||||
|
|
||||||
namespace Marco.Pms.CacheHelper
|
|
||||||
{
|
|
||||||
public class SidebarMenuHelper
|
|
||||||
{
|
|
||||||
private readonly IMongoCollection<MenuSection> _collection;
|
|
||||||
private readonly ILogger<SidebarMenuHelper> _logger;
|
|
||||||
|
|
||||||
public SidebarMenuHelper(IConfiguration configuration, ILogger<SidebarMenuHelper> logger)
|
|
||||||
{
|
|
||||||
_logger = logger;
|
|
||||||
var connectionString = configuration["MongoDB:ModificationConnectionString"];
|
|
||||||
var mongoUrl = new MongoUrl(connectionString);
|
|
||||||
var client = new MongoClient(mongoUrl);
|
|
||||||
var database = client.GetDatabase(mongoUrl.DatabaseName);
|
|
||||||
_collection = database.GetCollection<MenuSection>("Menus");
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> CreateMenuSectionAsync(MenuSection section)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await _collection.InsertOneAsync(section);
|
|
||||||
return section;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error occurred while adding MenuSection.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> UpdateMenuSectionAsync(Guid sectionId, MenuSection updatedSection)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set(s => s.Header, updatedSection.Header)
|
|
||||||
.Set(s => s.Title, updatedSection.Title)
|
|
||||||
.Set(s => s.Items, updatedSection.Items);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating MenuSection.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> AddMenuItemAsync(Guid sectionId, MenuItem newItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
newItem.Id = Guid.NewGuid();
|
|
||||||
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update.Push(s => s.Items, newItem);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error adding menu item.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuItem?> UpdateMenuItemAsync(Guid sectionId, Guid itemId, MenuItem updatedItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.And(
|
|
||||||
Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId),
|
|
||||||
Builders<MenuSection>.Filter.ElemMatch(s => s.Items, i => i.Id == itemId)
|
|
||||||
);
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set("Items.$.Text", updatedItem.Text)
|
|
||||||
.Set("Items.$.Icon", updatedItem.Icon)
|
|
||||||
.Set("Items.$.Available", updatedItem.Available)
|
|
||||||
.Set("Items.$.Link", updatedItem.Link)
|
|
||||||
.Set("Items.$.PermissionIds", updatedItem.PermissionIds);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
// Re-fetch section and return the updated item
|
|
||||||
var section = await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
return section?.Items.FirstOrDefault(i => i.Id == itemId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating MenuItem.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<MenuSection?> AddSubMenuItemAsync(Guid sectionId, Guid itemId, SubMenuItem newSubItem)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
newSubItem.Id = Guid.NewGuid();
|
|
||||||
|
|
||||||
// Match the MenuSection and the specific MenuItem inside it
|
|
||||||
var filter = Builders<MenuSection>.Filter.And(
|
|
||||||
Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId),
|
|
||||||
Builders<MenuSection>.Filter.ElemMatch(s => s.Items, i => i.Id == itemId)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Use positional operator `$` to target matched MenuItem and push into its Submenu
|
|
||||||
var update = Builders<MenuSection>.Update.Push("Items.$.Submenu", newSubItem);
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update);
|
|
||||||
|
|
||||||
if (result.ModifiedCount > 0)
|
|
||||||
{
|
|
||||||
return await _collection.Find(s => s.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error adding submenu item.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<SubMenuItem?> UpdateSubmenuItemAsync(Guid sectionId, Guid itemId, Guid subItemId, SubMenuItem updatedSub)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(s => s.Id, sectionId);
|
|
||||||
|
|
||||||
var arrayFilters = new List<ArrayFilterDefinition>
|
|
||||||
{
|
|
||||||
new BsonDocumentArrayFilterDefinition<BsonDocument>(
|
|
||||||
new BsonDocument("item._id", itemId.ToString())),
|
|
||||||
new BsonDocumentArrayFilterDefinition<BsonDocument>(
|
|
||||||
new BsonDocument("sub._id", subItemId.ToString()))
|
|
||||||
};
|
|
||||||
|
|
||||||
var update = Builders<MenuSection>.Update
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Text", updatedSub.Text)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Available", updatedSub.Available)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].Link", updatedSub.Link)
|
|
||||||
.Set("Items.$[item].Submenu.$[sub].PermissionKeys", updatedSub.PermissionIds);
|
|
||||||
|
|
||||||
var options = new UpdateOptions { ArrayFilters = arrayFilters };
|
|
||||||
|
|
||||||
var result = await _collection.UpdateOneAsync(filter, update, options);
|
|
||||||
|
|
||||||
if (result.ModifiedCount == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var updatedSection = await _collection.Find(x => x.Id == sectionId).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var subItem = updatedSection?.Items
|
|
||||||
.FirstOrDefault(i => i.Id == itemId)?
|
|
||||||
.Submenu
|
|
||||||
.FirstOrDefault(s => s.Id == subItemId);
|
|
||||||
|
|
||||||
return subItem;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Error updating SubMenuItem.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async Task<List<MenuSection>> GetAllMenuSectionsAsync(Guid tenantId)
|
|
||||||
{
|
|
||||||
var filter = Builders<MenuSection>.Filter.Eq(e => e.TenantId, tenantId);
|
|
||||||
|
|
||||||
var result = await _collection
|
|
||||||
.Find(filter)
|
|
||||||
.ToListAsync();
|
|
||||||
if (result.Any())
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
tenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
|
||||||
filter = Builders<MenuSection>.Filter.Eq(e => e.TenantId, tenantId);
|
|
||||||
|
|
||||||
result = await _collection
|
|
||||||
.Find(filter)
|
|
||||||
.ToListAsync();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
using Marco.Pms.Model.MongoDBModels;
|
using Marco.Pms.Model.MongoDBModels.Utility;
|
||||||
using Marco.Pms.Model.MongoDBModels.Utility;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using MongoDB.Bson;
|
using MongoDB.Bson;
|
||||||
@ -26,30 +25,8 @@ namespace Marco.Pms.Helpers.Utility
|
|||||||
#region =================================================================== Update Log Helper Functions ===================================================================
|
#region =================================================================== Update Log Helper Functions ===================================================================
|
||||||
public async Task PushToUpdateLogsAsync(UpdateLogsObject oldObject, string collectionName)
|
public async Task PushToUpdateLogsAsync(UpdateLogsObject oldObject, string collectionName)
|
||||||
{
|
{
|
||||||
try
|
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
||||||
{
|
await collection.InsertOneAsync(oldObject);
|
||||||
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
|
||||||
await collection.InsertOneAsync(oldObject);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while saving object of update logs in collection: {Collection}", collectionName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public async Task PushListToUpdateLogsAsync(List<UpdateLogsObject> oldObjects, string collectionName)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var collection = _mongoDatabase.GetCollection<UpdateLogsObject>(collectionName);
|
|
||||||
if (oldObjects.Any())
|
|
||||||
{
|
|
||||||
await collection.InsertManyAsync(oldObjects);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while saving list of update logs in collection: {Collection}", collectionName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<UpdateLogsObject>> GetFromUpdateLogsByEntityIdAsync(Guid entityId, string collectionName)
|
public async Task<List<UpdateLogsObject>> GetFromUpdateLogsByEntityIdAsync(Guid entityId, string collectionName)
|
||||||
@ -147,86 +124,5 @@ namespace Marco.Pms.Helpers.Utility
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region =================================================================== NotificatioBody Helper Functions ===================================================================
|
|
||||||
|
|
||||||
public async Task AddNotificationAsync(NotificationMongoDB notification)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var collection = _mongoDatabase.GetCollection<NotificationMongoDB>("NotificatioBody");
|
|
||||||
|
|
||||||
var indexKeys = Builders<NotificationMongoDB>.IndexKeys
|
|
||||||
.Ascending(doc => doc.TenantId)
|
|
||||||
.Ascending(doc => doc.Name);
|
|
||||||
|
|
||||||
// Define index options with unique constraint
|
|
||||||
var indexOptions = new CreateIndexOptions { Unique = true };
|
|
||||||
|
|
||||||
// Create the index model
|
|
||||||
var indexModel = new CreateIndexModel<NotificationMongoDB>(indexKeys, indexOptions);
|
|
||||||
|
|
||||||
// Create the index on the collection (this operation is idempotent)
|
|
||||||
collection.Indexes.CreateOne(indexModel);
|
|
||||||
|
|
||||||
await collection.InsertOneAsync(notification);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while adding the Notification body {NotificationName} for tenant {TenantId}", notification.Name, notification.TenantId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<NotificationMongoDB> GetNotificationBodyAsync(string name, Guid tenantId)
|
|
||||||
{
|
|
||||||
var rootTenantId = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26");
|
|
||||||
NotificationMongoDB? result = null;
|
|
||||||
NotificationMongoDB? defaultNotification = new NotificationMongoDB
|
|
||||||
{
|
|
||||||
Name = "default",
|
|
||||||
Title = "Error: Something Went Wrong",
|
|
||||||
Body = " An unexpected error occurred. Please try again. If the problem persists, contact support",
|
|
||||||
Parameters = "",
|
|
||||||
TenantId = rootTenantId
|
|
||||||
};
|
|
||||||
|
|
||||||
var collection = _mongoDatabase.GetCollection<NotificationMongoDB>("NotificatioBody");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<NotificationMongoDB>.Filter.And(
|
|
||||||
Builders<NotificationMongoDB>.Filter.Eq(n => n.Name, name),
|
|
||||||
Builders<NotificationMongoDB>.Filter.Eq(n => n.TenantId, tenantId)
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
result = await collection
|
|
||||||
.Find(filter)
|
|
||||||
.FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while fetching the Notification body {NotificationName} for tenant {TenantId}", name, tenantId);
|
|
||||||
}
|
|
||||||
if (result == null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var filter = Builders<NotificationMongoDB>.Filter.And(
|
|
||||||
Builders<NotificationMongoDB>.Filter.Eq(n => n.Name, name),
|
|
||||||
Builders<NotificationMongoDB>.Filter.Eq(n => n.TenantId, rootTenantId)
|
|
||||||
|
|
||||||
);
|
|
||||||
result = await collection.Find(filter).FirstOrDefaultAsync();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Exception occured while fetching the Notification body {NotificationName} for tenant {TenantId}", name, rootTenantId);
|
|
||||||
return defaultNotification;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.AppMenu
|
|
||||||
{
|
|
||||||
public class MenuItem
|
|
||||||
{
|
|
||||||
[BsonId]
|
|
||||||
[BsonRepresentation(BsonType.String)]
|
|
||||||
public Guid Id { get; set; } = Guid.NewGuid();
|
|
||||||
|
|
||||||
public string? Text { get; set; }
|
|
||||||
public string? Icon { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public string? Link { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
|
|
||||||
public List<SubMenuItem> Submenu { get; set; } = new List<SubMenuItem>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.AppMenu
|
|
||||||
{
|
|
||||||
public class MenuSection
|
|
||||||
{
|
|
||||||
[BsonId]
|
|
||||||
[BsonRepresentation(BsonType.String)]
|
|
||||||
public Guid Id { get; set; } = Guid.NewGuid();
|
|
||||||
|
|
||||||
public string? Header { get; set; }
|
|
||||||
public string? Title { get; set; }
|
|
||||||
public List<MenuItem> Items { get; set; } = new List<MenuItem>();
|
|
||||||
|
|
||||||
[BsonRepresentation(BsonType.String)]
|
|
||||||
public Guid TenantId { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.AppMenu
|
|
||||||
{
|
|
||||||
public class SubMenuItem
|
|
||||||
{
|
|
||||||
[BsonId]
|
|
||||||
[BsonRepresentation(BsonType.String)]
|
|
||||||
public Guid Id { get; set; } = Guid.NewGuid();
|
|
||||||
|
|
||||||
public string? Text { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
using Marco.Pms.Model.Dtos.Attendance;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Marco.Pms.Model.Dtos.Attendance;
|
||||||
using Marco.Pms.Model.Employees;
|
using Marco.Pms.Model.Employees;
|
||||||
using Marco.Pms.Model.Utilities;
|
using Marco.Pms.Model.Utilities;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.AttendanceModule
|
namespace Marco.Pms.Model.AttendanceModule
|
||||||
{
|
{
|
||||||
@ -10,11 +10,9 @@ namespace Marco.Pms.Model.AttendanceModule
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string Comment { get; set; } = string.Empty;
|
public string Comment { get; set; } = string.Empty;
|
||||||
public Guid EmployeeId { get; set; }
|
public Guid EmployeeID { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[ForeignKey("EmployeeId")]
|
|
||||||
[ValidateNever]
|
|
||||||
public Employee? Employee { get; set; }
|
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public Guid ProjectID { get; set; }
|
public Guid ProjectID { get; set; }
|
||||||
|
|
||||||
@ -24,17 +22,9 @@ namespace Marco.Pms.Model.AttendanceModule
|
|||||||
public bool IsApproved { get; set; }
|
public bool IsApproved { get; set; }
|
||||||
public ATTENDANCE_MARK_TYPE Activity { get; set; }
|
public ATTENDANCE_MARK_TYPE Activity { get; set; }
|
||||||
|
|
||||||
public Guid? ApprovedById { get; set; }
|
public Guid? ApprovedBy { get; set; }
|
||||||
|
[ForeignKey("EmployeeID")]
|
||||||
[ForeignKey("ApprovedById")]
|
|
||||||
[ValidateNever]
|
[ValidateNever]
|
||||||
public Employee? Approver { get; set; }
|
public Employee? Approver { get; set; }
|
||||||
public DateTime? RequestedAt { get; set; }
|
|
||||||
public DateTime? ApprovedAt { get; set; }
|
|
||||||
public Guid? RequestedById { get; set; }
|
|
||||||
|
|
||||||
[ForeignKey("RequestedById")]
|
|
||||||
[ValidateNever]
|
|
||||||
public Employee? RequestedBy { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
namespace Marco.Pms.Model.Authentication
|
using Marco.Pms.Model.Utilities;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Authentication
|
||||||
{
|
{
|
||||||
public class MPINDetails
|
public class MPINDetails : TenantRelation
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
namespace Marco.Pms.Model.Authentication
|
using Marco.Pms.Model.Utilities;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.Authentication
|
||||||
{
|
{
|
||||||
public class OTPDetails
|
public class OTPDetails : TenantRelation
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
|
||||||
namespace Marco.Pms.Model.Directory
|
namespace Marco.Pms.Model.Directory
|
||||||
{
|
{
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class AttachmentTagMapping : TenantRelation
|
|
||||||
{
|
|
||||||
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid DocumentTagId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("DocumentTagId")]
|
|
||||||
public DocumentTagMaster? DocumentTag { get; set; }
|
|
||||||
public Guid AttachmentId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("AttachmentId")]
|
|
||||||
public DocumentAttachment? Attachment { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class AttachmentVersionMapping : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public Guid ParentAttachmentId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("ParentAttachmentId")]
|
|
||||||
public DocumentAttachment? ParentAttachment { get; set; }
|
|
||||||
public int Version { get; set; } = 1;
|
|
||||||
|
|
||||||
public Guid ChildAttachmentId { get; set; }
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("ChildAttachmentId")]
|
|
||||||
public DocumentAttachment? ChildAttachment { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
using Marco.Pms.Model.Employees;
|
|
||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class DocumentAttachment : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string? DocumentId { get; set; }
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public bool IsCurrentVersion { get; set; } = true;
|
|
||||||
public DateTime UploadedAt { get; set; }
|
|
||||||
public Guid UploadedById { get; set; } // References the employee who uploaded the document
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("UploadedById")]
|
|
||||||
public Employee? UploadedBy { get; set; }
|
|
||||||
public DateTime? UpdatedAt { get; set; }
|
|
||||||
public Guid? UpdatedById { get; set; } // References the employee who updates the document
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("UpdatedById")]
|
|
||||||
public Employee? UpdatedBy { get; set; }
|
|
||||||
public DateTime? VerifiedAt { get; set; }
|
|
||||||
public bool? IsVerified { get; set; }
|
|
||||||
public Guid? VerifiedById { get; set; } // Associates the document with a specific employee, if applicable
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("VerifiedById")]
|
|
||||||
public Employee? VerifiedBy { get; set; }
|
|
||||||
public Guid EntityId { get; set; } // Associates the document with a specific project, if applicable
|
|
||||||
public Guid DocumentTypeId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("DocumentTypeId")]
|
|
||||||
public DocumentTypeMaster? DocumentType { get; set; }
|
|
||||||
|
|
||||||
public Guid DocumentDataId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("DocumentDataId")]
|
|
||||||
public Document? Document { get; set; }
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class DocumentAttachmentMapping : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public Guid AttachmentId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("AttachmentId")]
|
|
||||||
public DocumentAttachment? Attachment { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
using Marco.Pms.Model.Master;
|
|
||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class DocumentCategoryMaster : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
public Guid EntityTypeId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("EntityTypeId")]
|
|
||||||
public EntityTypeMaster? EntityTypeMaster { get; set; }
|
|
||||||
|
|
||||||
public DateTime CreatedAt { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class DocumentTagMaster : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string Description { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
using Marco.Pms.Model.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Marco.Pms.Model.DocumentManager
|
|
||||||
{
|
|
||||||
public class DocumentTypeMaster : TenantRelation
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public string? RegexExpression { get; set; }
|
|
||||||
public string AllowedContentType { get; set; } = string.Empty;
|
|
||||||
public double MaxSizeAllowedInMB { get; set; } = 2;
|
|
||||||
public bool IsValidationRequired { get; set; } = true;
|
|
||||||
public bool IsMandatory { get; set; } = true;
|
|
||||||
public bool IsSystem { get; set; } = false;
|
|
||||||
public bool IsActive { get; set; } = true;
|
|
||||||
public Guid DocumentCategoryId { get; set; }
|
|
||||||
|
|
||||||
[ValidateNever]
|
|
||||||
[ForeignKey("DocumentCategoryId")]
|
|
||||||
public DocumentCategoryMaster? DocumentCategory { get; set; }
|
|
||||||
|
|
||||||
public DateTime CreatedAt { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,9 +2,10 @@
|
|||||||
{
|
{
|
||||||
public class CreateActivityMasterDto
|
public class CreateActivityMasterDto
|
||||||
{
|
{
|
||||||
public required Guid ActivityGroupId { get; set; }
|
public Guid ActitvityGroupId { get; set; }
|
||||||
public required string ActivityName { get; set; }
|
public Guid ServiceId { get; set; }
|
||||||
public required string UnitOfMeasurement { get; set; }
|
public string? ActivityName { get; set; }
|
||||||
|
public string? UnitOfMeasurement { get; set; }
|
||||||
public List<CreateCheckListDto>? CheckList { get; set; }
|
public List<CreateCheckListDto>? CheckList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
public class CreateCheckListDto
|
public class CreateCheckListDto
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public required string Description { get; set; }
|
public string? Description { get; set; }
|
||||||
public required bool IsMandatory { get; set; }
|
public bool IsMandatory { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public class CreateWorkStatusMasterDto
|
public class CreateWorkStatusMasterDto
|
||||||
{
|
{
|
||||||
public required string Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public required string Description { get; set; }
|
public string? Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
public class UpdateWorkStatusMasterDto
|
public class UpdateWorkStatusMasterDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public required string Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public required string Description { get; set; }
|
public string? Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class CreateMenuItemDto
|
|
||||||
{
|
|
||||||
public required string Text { get; set; }
|
|
||||||
public required string Icon { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public required string Link { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
|
|
||||||
public List<CreateSubMenuItemDto> Submenu { get; set; } = new List<CreateSubMenuItemDto>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class CreateMenuSectionDto
|
|
||||||
{
|
|
||||||
public required string Header { get; set; }
|
|
||||||
public required string Title { get; set; }
|
|
||||||
public List<CreateMenuItemDto> Items { get; set; } = new List<CreateMenuItemDto>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class CreateSubMenuItemDto
|
|
||||||
{
|
|
||||||
public required string Text { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public required string Link { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class UpdateMenuItemDto
|
|
||||||
{
|
|
||||||
public required Guid Id { get; set; }
|
|
||||||
|
|
||||||
public required string Text { get; set; }
|
|
||||||
public required string Icon { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public required string Link { get; set; }
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class UpdateMenuSectionDto
|
|
||||||
{
|
|
||||||
public required Guid Id { get; set; }
|
|
||||||
public required string Header { get; set; }
|
|
||||||
public required string Title { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
namespace Marco.Pms.Model.Dtos.AppMenu
|
|
||||||
{
|
|
||||||
public class UpdateSubMenuItemDto
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
public string? Text { get; set; }
|
|
||||||
public bool Available { get; set; } = true;
|
|
||||||
|
|
||||||
public string Link { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
// Changed from string → List<string>
|
|
||||||
public List<string> PermissionIds { get; set; } = new List<string>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,7 +19,6 @@ namespace Marco.Pms.Model.Dtos.Attendance
|
|||||||
public ATTENDANCE_MARK_TYPE Action { get; set; }
|
public ATTENDANCE_MARK_TYPE Action { get; set; }
|
||||||
|
|
||||||
public FileUploadModel? Image { get; set; }
|
public FileUploadModel? Image { get; set; }
|
||||||
public string DeviceToken { get; set; } = string.Empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ATTENDANCE_MARK_TYPE
|
public enum ATTENDANCE_MARK_TYPE
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user