Answers.Body: <p>Do you have logging turned on (admin - system settings - misc)? If so then the log table is probably out of sync. Check log_civicrm_relationship to see if it has the field. If it doesn't have the field, try admin - system settings - clear cache and also rebuilding triggers: <a href="https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#trigger-rebuild" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#trigger-rebuild</a></p>
  <p><code>https://example.org/civicrm/menu/rebuild?reset=1&amp;triggerRebuild=1</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-04T14:35:37.790Z
Answers.Text: Thank you so much. This solved the problem.
Answers.UserDisplayName: xtylus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-03T19:28:30.487Z
Answers.LastActivityDate: 2022-05-03T19:28:30.487Z
Answers.UserDisplayName: Demerit
Body: <p>When I try to add or edit an &quot;Employee of&quot; Relationship, I get a &quot;no such field&quot; error, although this field exists in the database. Any ideas how to proceed?</p>
  <p>CiviCRM 5.48.2; MySQL:5; PHP 7.4</p>
  <p>From error log</p>
  <pre><code>    [message] =&gt; DB Error: no such field
      [mode] =&gt; 16
      [debug_info] =&gt; INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']
      [type] =&gt; DB_Error
      [user_info] =&gt; INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']
      [to_string] =&gt; [db_error: message=&quot;DB Error: no such field&quot; code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix=&quot;&quot; info=&quot;INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']&quot;]
  )```
  </code></pre>
  
Tags: <contacts><relationships>
Title: DB Error: no such field "created_date"
ThreadText: # DB Error: no such field "created_date"
  
  (Asked by: username_0 on 2022-05-03)
  
  When I try to add or edit an "Employee of" Relationship, I get a "no such field" error, although this field exists in the database. Any ideas how to proceed?
  CiviCRM 5.48.2; MySQL:5; PHP 7.4
  From error log
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']
      [type] => DB_Error
      [user_info] => INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO `civicrm_relationship` (`contact_id_a` , `contact_id_b` , `relationship_type_id` , `start_date` , `end_date` , `is_active` , `description` , `is_permission_a_b` , `is_permission_b_a` ) VALUES ( 55680 ,  1377 ,  4 ,  NULL ,  NULL ,  1 , '' ,  0 ,  0 )  [nativecode=1054 ** Unknown column 'created_date' in 'field list']"]
  )```
  
  **Tags:** contacts, relationships
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-05-03. Score: 2 | Accepted answer
  
  Do you have logging turned on (admin - system settings - misc)? If so then the log table is probably out of sync. Check log\_civicrm\_relationship to see if it has the field. If it doesn't have the field, try admin - system settings - clear cache and also rebuilding triggers: <https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#trigger-rebuild>
  
  `https://example.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1`
  
  > **Comments:**
  > **username_0**: Thank you so much. This solved the problem.  
  
  ---
  
  