CREATE OR REPLACE VIEW `device_view` AS select `device`.`uuid` AS `uuid`,`device`.`aindex` AS `aindex`,`device`.`reg` AS `reg`,`device`.`reg_prev` AS `reg_prev`,`device`.`reg_unavailable` AS `reg_unavailable`,`device`.`editor` AS `editor`,`device`.`inspector` AS `inspector`,`device`.`title` AS `title`,`device`.`notes` AS `notes`,`device`.`EditDate` AS `EditDate`,`device`.`version` AS `version`,`device`.`certificate_latest_int` AS `certificate_latest_int`,`device`.`next_usage_inspection` AS `next_usage_inspection`,`device`.`next_inside_inspection` AS `next_inside_inspection`,`device`.`next_scheduled_pressure` AS `next_scheduled_pressure`,`device`.`next_scheduled_inspection` AS `next_scheduled_inspection`,`device`.`next_other_inspection` AS `next_other_inspection`,`device`.`next_followup` AS `next_followup`,`device`.`next_operational_inspection` AS `next_operational_inspection`,`device`.`next_condition_inspection` AS `next_condition_inspection`,`device`.`next_seal_inspection` AS `next_seal_inspection`,`device`.`inspection_date_latest` AS `inspection_date_latest`,`device`.`inspection_date_next` AS `inspection_date_next`,`device`.`running_number` AS `running_number`,`device`.`running_number_changed` AS `running_number_changed`,`device`.`running_number_history` AS `running_number_history`,`device`.`company_owner` AS `company_owner`,`device`.`company_holder` AS `company_holder`,`device`.`company_manufacturer` AS `company_manufacturer`,`device`.`company_importer` AS `company_importer`,`device`.`person_contact` AS `person_contact`,`device`.`person_supervisor` AS `person_supervisor`,`device`.`person_supervisor_alt` AS `person_supervisor_alt`,`device`.`inspector_person_name` AS `inspector_person_name`,`device`.`container_number` AS `container_number`,`device`.`manufacturing_year` AS `manufacturing_year`,`device`.`manufacturing_number` AS `manufacturing_number`,`device`.`manufacturing_standardby` AS `manufacturing_standardby`,`device`.`manufacturing_standard` AS `manufacturing_standard`,`device`.`location_device` AS `location_device`,`device`.`location_description` AS `location_description`,`device`.`location_address` AS `location_address`,`device`.`location_street` AS `location_street`,`device`.`location_zip_code` AS `location_zip_code`,`device`.`location_city` AS `location_city`,`device`.`category_code` AS `category_code`,`device`.`category_description` AS `category_description`,`device`.`subcategory_code` AS `subcategory_code`,`device`.`subcategory_description` AS `subcategory_description`,`device`.`substucture_description` AS `substucture_description`,`device`.`usage_method_code` AS `usage_method_code`,`device`.`usage_method_description` AS `usage_method_description`,`device`.`stucture_code` AS `stucture_code`,`device`.`stucture_description` AS `stucture_description`,`device`.`stucture_sheat_material` AS `stucture_sheat_material`,`device`.`stucture_sheat_strength` AS `stucture_sheat_strength`,`device`.`stucture_bottom_material` AS `stucture_bottom_material`,`device`.`stucture_bottom_strength` AS `stucture_bottom_strength`,`device`.`stucture_topend_material` AS `stucture_topend_material`,`device`.`stucture_topend_strength` AS `stucture_topend_strength`,`device`.`stucture_drawings` AS `stucture_drawings`,`device`.`primary_fuel_code` AS `primary_fuel_code`,`device`.`primary_fuel` AS `primary_fuel`,`device`.`ps_state1_min` AS `ps_state1_min`,`device`.`ps_state1_max` AS `ps_state1_max`,`device`.`ps_state2_min` AS `ps_state2_min`,`device`.`ps_state2_max` AS `ps_state2_max`,`device`.`ps_state3_min` AS `ps_state3_min`,`device`.`ps_state3_max` AS `ps_state3_max`,`device`.`ts_state1_min` AS `ts_state1_min`,`device`.`ts_state1_max` AS `ts_state1_max`,`device`.`ts_state2_min` AS `ts_state2_min`,`device`.`ts_state2_max` AS `ts_state2_max`,`device`.`ts_state3_min` AS `ts_state3_min`,`device`.`ts_state3_max` AS `ts_state3_max`,`device`.`v_state1` AS `v_state1`,`device`.`v_state2` AS `v_state2`,`device`.`v_state3` AS `v_state3`,`device`.`content_primary` AS `content_primary`,`device`.`content_primary_title` AS `content_primary_title`,`device`.`content_primary_subtitle` AS `content_primary_subtitle`,`device`.`content_primary_density` AS `content_primary_density`,`device`.`content_state1` AS `content_state1`,`device`.`content_state1_title` AS `content_state1_title`,`device`.`content_state1_subtitle` AS `content_state1_subtitle`,`device`.`content_state2` AS `content_state2`,`device`.`content_state2_title` AS `content_state2_title`,`device`.`content_state2_subtitle` AS `content_state2_subtitle`,`device`.`content_state3` AS `content_state3`,`device`.`content_state3_title` AS `content_state3_title`,`device`.`content_state3_subtitle` AS `content_state3_subtitle`,`device`.`power_state1` AS `power_state1`,`device`.`power_state2` AS `power_state2`,`device`.`power_state3` AS `power_state3`,`device`.`latest_other_inspection` AS `latest_other_inspection`,`device`.`latest_followup` AS `latest_followup`,`device`.`latest_seal_inspection` AS `latest_seal_inspection`,`device`.`latest_condition_inspection` AS `latest_condition_inspection`,`device`.`latest_operational_inspection` AS `latest_operational_inspection`,`device`.`latest_scheduled_inspection` AS `latest_scheduled_inspection`,`device`.`latest_usage_inspection` AS `latest_usage_inspection`,`device`.`latest_scheduled_pressure` AS `latest_scheduled_pressure`,`device`.`latest_inside_inspection` AS `latest_inside_inspection`,`device`.`latest_change_inspection` AS `latest_change_inspection`,`device`.`cycle_other_inspection` AS `cycle_other_inspection`,`device`.`cycle_followup` AS `cycle_followup`,`device`.`cycle_seal_inspection` AS `cycle_seal_inspection`,`device`.`cycle_condition_inspection` AS `cycle_condition_inspection`,`device`.`cycle_operational_inspection` AS `cycle_operational_inspection`,`device`.`cycle_scheduled_inspection` AS `cycle_scheduled_inspection`,`device`.`cycle_usage_inspection` AS `cycle_usage_inspection`,`device`.`cycle_scheduled_pressure` AS `cycle_scheduled_pressure`,`device`.`cycle_inside_inspection` AS `cycle_inside_inspection`,`device`.`UpdateTime` AS `UpdateTime`,`device`.`InsertTime` AS `InsertTime`,`device`.`orbeon_import_allowed` AS `orbeon_import_allowed`,`device`.`orbeon_imported` AS `orbeon_imported`,`device`.`title_state1` AS `title_state1`,`device`.`title_state2` AS `title_state2`,`device`.`title_state3` AS `title_state3`,`device`.`location_state1` AS `location_state1`,`device`.`location_state2` AS `location_state2`,`device`.`location_state3` AS `location_state3`,`device`.`dn_state1` AS `dn_state1`,`device`.`dn_state2` AS `dn_state2`,`device`.`dn_state3` AS `dn_state3`,`device`.`person_supervisor_role` AS `person_supervisor_role`,`device`.`person_supervisor_role_code` AS `person_supervisor_role_code`,`device`.`person_supervisor_alt_role` AS `person_supervisor_alt_role`,`device`.`person_supervisor_alt_role_code` AS `person_supervisor_alt_role_code`,`device`.`person_supervisor_alt_qualification` AS `person_supervisor_alt_qualification`,`device`.`person_supervisor_alt_qualification_code` AS `person_supervisor_alt_qualification_code`,`device`.`person_supervisor_qualification` AS `person_supervisor_qualification`,`device`.`person_supervisor_qualification_code` AS `person_supervisor_qualification_code`,`device`.`primary_diameter` AS `primary_diameter`,`device`.`primary_volume` AS `primary_volume`,`device`.`primary_lenght` AS `primary_lenght`,`device`.`primary_class` AS `primary_class`,`device`.`class_description` AS `class_description`,`device`.`safety_device_description` AS `safety_device_description`,`device`.`running_number_static` AS `running_number_static`,`device`.`delete_allowed` AS `delete_allowed`,`company_owner`.`name` AS `company_owner_name`,`company_holder`.`name` AS `company_holder_name`,`person_supervisor`.`name` AS `person_supervisor_name`,`person_supervisor_alt`.`name` AS `person_supervisor_alt_name`,`editor`.`name` AS `editor_name`,`inspector`.`name` AS `inspector_name` from ((((((`device` left join `company` `company_owner` on((`device`.`company_owner` = `company_owner`.`uuid`))) left join `company` `company_holder` on((`device`.`company_holder` = `company_holder`.`uuid`))) left join `person` `person_supervisor` on((`device`.`person_supervisor` = `person_supervisor`.`uuid`))) left join `person` `person_supervisor_alt` on((`device`.`person_supervisor_alt` = `person_supervisor_alt`.`uuid`))) left join `user` `editor` on((`device`.`editor` = `editor`.`uuid`))) left join `user` `inspector` on((`device`.`inspector` = `inspector`.`uuid`)));