CREATE OR REPLACE VIEW `form_view` AS select `form`.`uuid` AS `uuid`,`form`.`aindex` AS `aindex`,`form`.`aindex_form_template` AS `aindex_form_template`,`form`.`aindex_bundle` AS `aindex_bundle`,`form`.`form_template` AS `form_template`,`form`.`xml_template` AS `xml_template`,`form`.`xml_template2` AS `xml_template2`,`form`.`company` AS `company`,`form`.`device` AS `device`,`form`.`person` AS `person`,`form`.`user` AS `user`,`form`.`company_create` AS `company_create`,`form`.`employer_create` AS `employer_create`,`form`.`employer_update` AS `employer_update`,`form`.`version` AS `version`,`form`.`title` AS `title`,`form`.`fill_state` AS `fill_state`,`form`.`InsertTime` AS `InsertTime`,`form`.`UpdateTime` AS `UpdateTime`,`form`.`UpdateTimeTemplate` AS `UpdateTimeTemplate`,`form`.`upload` AS `upload`,`form`.`upload_url` AS `upload_url`,`form`.`pdf_upload` AS `pdf_upload`,`form`.`pdf_report` AS `pdf_report`,`form`.`pdf_url` AS `pdf_url`,`form`.`pdf_title` AS `pdf_title`,`form`.`sheet_url` AS `sheet_url`,`form`.`sheet_report` AS `sheet_report`,`form`.`export_date` AS `export_date`,`form`.`export_time` AS `export_time`,`form`.`export_lock` AS `export_lock`,`form`.`manual_report` AS `manual_report`,`form`.`xml_report` AS `xml_report`,`form`.`xml_error` AS `xml_error`,`form`.`xml_transfer` AS `xml_transfer`,`form`.`xml_transfer_timestamp` AS `xml_transfer_timestamp`,`form`.`xml_syslog` AS `xml_syslog`,`form`.`syslog` AS `syslog`,`form`.`archive` AS `archive`,coalesce(`device`.`reg`,`device`.`manufacturing_number`) AS `reg`,`company`.`name` AS `company_name`,`company`.`aindex` AS `company_aindex`,`person`.`name` AS `person_name`,`user`.`name` AS `employer_name` from ((((`form` left join `device` on((convert(`device`.`uuid` using utf8mb4) = `form`.`device`))) left join `person` on((convert(`person`.`uuid` using utf8mb4) = `form`.`person`))) left join `company` on((convert(`company`.`uuid` using utf8mb4) = `form`.`company`))) left join `user` on((convert(`user`.`uuid` using utf8mb4) = `form`.`employer_create`)));