INSERT INTO tblplan_features (name, codename, description,type,added_on) 
VALUES('Contractor Association', 'contractor_association', 'Contractor Association','restrict',UTC_TIMESTAMP());

SET @plans_features_id = LAST_INSERT_ID();
INSERT INTO tblplan_features_value (plans_id, plans_features_id, value,other_data,added_on) 
VALUES(9, @plans_features_id, 0,'{"outside_message":"Contractor Association is a pro feature, in order to use it Upgrade to PRO","inside_message":"Contractor Association is a pro feature, in order to use it Upgrade to PRO","tag_color":"#eb0e0e","tag_title":"PRO","link":"https:\/\/my.contractorplus.app\/","count":"0"}',UTC_TIMESTAMP()),
(10, @plans_features_id, 1,NULL,UTC_TIMESTAMP()),
(11, @plans_features_id, 1,NULL,UTC_TIMESTAMP()),
(12, @plans_features_id, 1,NULL,UTC_TIMESTAMP()),
(13, @plans_features_id, 0,'{"outside_message":"Contractor Association is a pro feature, in order to use it Upgrade to PRO","inside_message":"Contractor Association is a pro feature, in order to use it Upgrade to PRO","tag_color":"#eb0e0e","tag_title":"PRO","link":"https:\/\/my.contractorplus.app\/","count":"0"}',UTC_TIMESTAMP()),
(14, @plans_features_id, 1,NULL,UTC_TIMESTAMP()),
(15, @plans_features_id, 1,NULL,UTC_TIMESTAMP());


CREATE TABLE tblcontractor_associations (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `logo` varchar(140) NOT NULL,
  `url` varchar(150) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `added_on` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `tblcontractor_associations` (`name`, `logo`, `url`, `is_active`, `added_on`) VALUES
('American Subcontractors Association San Antonio','american_subcontractors_association_san_antonio.png',NULL,'1',UTC_TIMESTAMP()),
('Asian American Association of Texas','asian_american_association_of_texas.png',NULL,'1',UTC_TIMESTAMP()),
('Asphalt Pavement Association of West Virginia','asphalt_pavement_association_of_west_virginia.png',NULL,'1',UTC_TIMESTAMP()),
('Associated Plumbing Heating Cooling','associated_plumbing_heating_cooling.png',NULL,'1',UTC_TIMESTAMP()),
('Builders Association of Eastern Ohio and Western Pennsylvania','builders_association_of_eastern_ohio_and_western_pennsylvania.png',NULL,'1',UTC_TIMESTAMP()),
('Central Texas Roofing Contractors Association','central_texas_roofing_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('Earth Moving Contractors Association of Texas, Inc.','earth_moving_contractors_association_of_texas_inc.png',NULL,'1',UTC_TIMESTAMP()),
('Home Builders Association West Virginia','home_builders_association_west_virginia.png',NULL,'1',UTC_TIMESTAMP()),
('Houston Area Roofing Contractors Association','houston_area_roofing_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('Houston Contractors Association','houston_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('Mason Contractors Association of America','mason_contractors_association_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('Mechanical Contractors Association of Texas','mechanical_contractors_association_of_texas.png',NULL,'1',UTC_TIMESTAMP()),
('Midwest Roofing Contractors Association','midwest_roofing_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('National Association of Home Builders','national_association_of_home_builders.png',NULL,'1',UTC_TIMESTAMP()),
('ABC – Associated Builders and Contractors','abc_associated_builders_and_contractors.png',NULL,'1',UTC_TIMESTAMP()),
('AGC – Associated General Contractors','agc_associated_general_contractors.png',NULL,'1',UTC_TIMESTAMP()),
('NECA – National Electrical Contractors Association','neca_national_electrical_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('National Utility Contractors Association','national_utility_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('North Texas Roofing Contractors Association.','north_texas_roofing_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('Ohio Contractors Association OCA','ohio_contractors_association_oca.png',NULL,'1',UTC_TIMESTAMP()),
('Roofing Contractors Association of Texas','roofing_contractors_association_of_texas.png',NULL,'1',UTC_TIMESTAMP()),
('Texas Association of Builders','texas_association_of_builders.png',NULL,'1',UTC_TIMESTAMP()),
('Texas Construction Association','texas_construction_association.png',NULL,'1',UTC_TIMESTAMP()),
('Tri State General Contractors','tri_state_general_contractors.png',NULL,'1',UTC_TIMESTAMP()),
('United Masonry Contractors Association umca','united_masonry_contractors_association_umca.png',NULL,'1',UTC_TIMESTAMP()),
('GCA The General Contractors Association of New York','gca_the_general_contractors_association_of_new_york.png',NULL,'1',UTC_TIMESTAMP()),
('MCA – Mechanical Contractors Association of Western Washington','mca_mechanical_contractors_association_of_western_washington.png',NULL,'1',UTC_TIMESTAMP()),
('ACI – American Concrete Institute','aci_american_concrete_institute.png',NULL,'1',UTC_TIMESTAMP()),
('NAWIC – National Association of Women in Construction','nawic_national_association_of_women_in_construction.png',NULL,'1',UTC_TIMESTAMP()),
('MBA – Master Builders Association of King-Snohomish Counties','mba_master_builders_association_of_king_snohomish_counties.png',NULL,'1',UTC_TIMESTAMP()),
('PCA - Plumbing Contractors of America','pca_plumbing_contractors_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('PHCC - Plumbing-Heating-Cooling Contractors Association','phcc_plumbing_heating_cooling_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('PWB - Plumbers Without Borders','pwb_plumbers_without_borders.png',NULL,'1',UTC_TIMESTAMP()),
('NMPCA - Northern Mechanical/Plumbing Contractors Association','nmpca_northern_mechanical_plumbing_contractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('ASPE - American Society of Plumbing Contractors','aspe_american_society_of_plumbing_contractors.png',NULL,'1',UTC_TIMESTAMP()),
('IAPMO - International Association of Plumbing & Mechanical Officials','iapmo_international_association_of_plumbing_mechanical_officials.png',NULL,'1',UTC_TIMESTAMP()),
('NARI - National Association of The Remodeling Industry','nari_national_association_of_the_remodeling_industry.png',NULL,'1',UTC_TIMESTAMP()),
('United Association of Journeymen & Apprentices','united_association_of_journeymen_apprentices.png',NULL,'1',UTC_TIMESTAMP()),
('NKBA - National Kitchen & Bath Association','nkba_national_kitchen_bath_association.png',NULL,'1',UTC_TIMESTAMP()),
('Alliance of Construction Trades','alliance_of_construction_trades.png',NULL,'1',UTC_TIMESTAMP()),
('American Council for Construction Education','american_council_for_construction_education.png',NULL,'1',UTC_TIMESTAMP()),
('American Road & Transportation Builders Association','american_road_transportation_builders_association.png',NULL,'1',UTC_TIMESTAMP()),
('American Society of Civil Engineers','american_society_of_civil_engineers.png',NULL,'1',UTC_TIMESTAMP()),
('American Society of Professional Estimators','american_society_of_professional_estimators.png',NULL,'1',UTC_TIMESTAMP()),
('AIC - American Institute of Constructors','aic_american_institute_of_constructors.png',NULL,'1',UTC_TIMESTAMP()),
('American Society of Cost Segregation Professionals','american_society_of_cost_segregation_professionals.png',NULL,'1',UTC_TIMESTAMP()),
('ASA - American Subcontractors Association','asa_american_subcontractors_association.png',NULL,'1',UTC_TIMESTAMP()),
('TAI - The Asphalt Institute','tai_the_asphalt_institute.png',NULL,'1',UTC_TIMESTAMP()),
('ABC - Associated Builders & Contractors','abc_associated_builders_contractors.png',NULL,'1',UTC_TIMESTAMP()),
('Association of Equipment Manufacturers','association_of_equipment_manufacturers.png',NULL,'1',UTC_TIMESTAMP()),
('Construction Management Association of America','construction_management_association_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('Construction Owners Association of America','construction_owners_association_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('Construction Users Round Table','construction_users_round_table.png',NULL,'1',UTC_TIMESTAMP()),
('Construction Specifications Institute','construction_specifications_institute.png',NULL,'1',UTC_TIMESTAMP()),
('Design-Build Institute of America','design_build_institute_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('Interlocking Concrete Pavement Institute','interlocking_concrete_pavement_institute.png',NULL,'1',UTC_TIMESTAMP()),
('International Safety Equipment Association','international_safety_equipment_association.png',NULL,'1',UTC_TIMESTAMP()),
('Mason Contractors’ Association of Detroit, Michigan','mason_contractors_association_of_detroit_michigan.png',NULL,'1',UTC_TIMESTAMP()),
('Master Builders Association of Western Pennsylvania','master_builders_association_of_western_pennsylvania.png',NULL,'1',UTC_TIMESTAMP()),
('Mechanical Contractors Association of America','mechanical_contractors_association_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('National Asphalt Pavement Association','national_asphalt_pavement_association.png',NULL,'1',UTC_TIMESTAMP()),
('National Commissioners for the Certification of Crane Operators','national_commissioners_for_the_certification_of_crane_operators.png',NULL,'1',UTC_TIMESTAMP()),
('National Concrete Masonry Association','national_concrete_masonry_association.png',NULL,'1',UTC_TIMESTAMP()),
('National Council of Structural Engineers Association','national_council_of_structural_engineers_association.png',NULL,'1',UTC_TIMESTAMP()),
('Portland Cement Association','portland_cement_association.png',NULL,'1',UTC_TIMESTAMP()),
('Revitalization Institute','revitalization_institute.png',NULL,'1',UTC_TIMESTAMP()),
('ACHP - Association of Certified Handyman Professionals','achp_association_of_certified_handyman_professionals.png',NULL,'1',UTC_TIMESTAMP()),
('International Institute of Building Enclosure Consultants (IIBEC)','international_institute_of_building_enclosure.png',NULL,'1',UTC_TIMESTAMP()),
('Society for Marketing Professional Services','society_for_marketing_professional_services.png',NULL,'1',UTC_TIMESTAMP()),
('Specialized Carriers & Rigging Association','specialized_carriers_rigging_association.png',NULL,'1',UTC_TIMESTAMP()),
('The Surety & Fidelity Association of America (SFAA) ','surety_and_fidelity_association_of_america.png',NULL,'1',UTC_TIMESTAMP()),
('The Road Information Program (TRIP)','the_road_information_program_trip.png',NULL,'1',UTC_TIMESTAMP()),
('Utility & Transportation Contractors Association','utility_transportation_contractors_association.png',NULL,'1',UTC_TIMESTAMP());

UPDATE tblstaff SET refresh_permissions = 1;
