using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace Marco.Pms.DataAccess.Migrations { /// public partial class Added_Service_And_ActivityGroup_Master_Table : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.UpdateData( table: "ActivityMasters", keyColumn: "UnitOfMeasurement", keyValue: null, column: "UnitOfMeasurement", value: ""); migrationBuilder.AlterColumn( 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( 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( name: "ActitvityGroupId", table: "ActivityMasters", type: "char(36)", nullable: true, collation: "ascii_general_ci"); migrationBuilder.AddColumn( name: "ServiceId", table: "ActivityMasters", type: "char(36)", nullable: true, collation: "ascii_general_ci"); migrationBuilder.CreateTable( name: "ActivityGroupMasters", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Name = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), ServiceId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), IsSystem = table.Column(type: "tinyint(1)", nullable: false), IsActive = table.Column(type: "tinyint(1)", nullable: false), TenantId = table.Column(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(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Name = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), IsSystem = table.Column(type: "tinyint(1)", nullable: false), IsActive = table.Column(type: "tinyint(1)", nullable: false), TenantId = table.Column(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"); } /// 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( name: "UnitOfMeasurement", table: "ActivityMasters", type: "longtext", nullable: true, oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ActivityName", table: "ActivityMasters", type: "longtext", nullable: true, oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }