Answers.Body: <p>Thanks.  The problem seems to have come from not running the extension upgrade at /civicrm/admin/extensions/upgrade?reset=1</p>
  <p>After doing that civicrm_search_segment is back.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-01T13:23:31.690Z
Answers.LastActivityDate: 2022-08-01T13:23:31.690Z
Answers.UserDisplayName: breckenr
Body: <p>In moving from 5.49 to 5.50 we seem to lose a table.  All civimails generate a &quot;DB missing table error&quot; and the logs show the following.  We get this error with all of the new versions of 50+ but not the last version of 49.</p>
  <blockquote>
  <p>Jul 29 10:45:54  [error] $Fatal Error Details = Array
  (
  [callback] =&gt; Array
  (
  [0] =&gt; CRM_Core_Error
  [1] =&gt; exceptionHandler
  )</p>
  <p>[code] =&gt; -18
  [message] =&gt; DB Error: no such table
  [mode] =&gt; 16
  [debug_info] =&gt; SELECT <code>a</code>.<code>id</code> AS <code>id</code>, <code>a</code>.<code>name</code> AS <code>name</code>, <code>a</code>.<code>label</code> AS <code>label</code>, <code>a</code>.<code>description</code> AS <code>description</code>, <code>a</code>$
  FROM civicrm_search_segment a
  ORDER BY <code>label</code> ASC
  [nativecode=1146 ** Table 'civicrm.civicrm_search_segment' doesn't exist]
  [type] =&gt; DB_Error
  [user_info] =&gt; SELECT <code>a</code>.<code>id</code> AS <code>id</code>, <code>a</code>.<code>name</code> AS <code>name</code>, <code>a</code>.<code>label</code> AS <code>label</code>, <code>a</code>.<code>description</code> AS <code>description</code>, <code>a</code>.$
  FROM civicrm_search_segment a
  ORDER BY <code>label</code> ASC
  [nativecode=1146 ** Table 'civicrm.civicrm_search_segment' doesn't exist]
  [to_string] =&gt; [db_error: message=&quot;DB Error: no such table&quot; code=-18 mode=callback callback=CRM_Core_Error::exceptionHandler p$
  FROM civicrm_search_segment a
  ORDER BY <code>label</code> ASC
  [nativecode=1146 ** Table 'civicrm.civicrm_search_segment' doesn't exist]&quot;]</p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-29T16:34:32.433Z
Comments.Text: I've literally just upgraded a site from 5.49 to 5.51.1 and the table called civicrm_search_segment is there post-upgrade. I'm assuming your database is called 'civicrm'? If not that might be the issue
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-29T18:58:13.403Z
Comments.Text: Also have you run extension upgrades? If you can't get into the UI to the system status page then can do on command line `cv ext:upgrade-db`
Comments.UserDisplayName: Demerit
Tags: <civimail><upgrade><database>
Title: Upgrade issue moving from 5.49+ to 5.50*
ThreadText: # Upgrade issue moving from 5.49+ to 5.50*
  
  (Asked by: username_0 on 2022-07-29)
  
  In moving from 5.49 to 5.50 we seem to lose a table. All civimails generate a "DB missing table error" and the logs show the following. We get this error with all of the new versions of 50+ but not the last version of 49.
  
  > Jul 29 10:45:54 [error] $Fatal Error Details = Array
  > (
  > [callback] => Array
  > (
  > [0] => CRM\_Core\_Error
  > [1] => exceptionHandler
  > )
  >
  > [code] => -18
  > [message] => DB Error: no such table
  > [mode] => 16
  > [debug\_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`description` AS `description`, `a`$
  > FROM civicrm\_search\_segment a
  > ORDER BY `label` ASC
  > [nativecode=1146 \*\* Table 'civicrm.civicrm\_search\_segment' doesn't exist]
  > [type] => DB\_Error
  > [user\_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`description` AS `description`, `a`.$
  > FROM civicrm\_search\_segment a
  > ORDER BY `label` ASC
  > [nativecode=1146 \*\* Table 'civicrm.civicrm\_search\_segment' doesn't exist]
  > [to\_string] => [db\_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM\_Core\_Error::exceptionHandler p$
  > FROM civicrm\_search\_segment a
  > ORDER BY `label` ASC
  > [nativecode=1146 \*\* Table 'civicrm.civicrm\_search\_segment' doesn't exist]"]
  
  **Tags:** civimail, upgrade, database
  
  > **Comments:**
  > **username_1**: I've literally just upgraded a site from 5.49 to 5.51.1 and the table called civicrm_search_segment is there post-upgrade. I'm assuming your database is called 'civicrm'? If not that might be the issue  
  > **username_2**: Also have you run extension upgrades? If you can't get into the UI to the system status page then can do on command line `cv ext:upgrade-db`  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-08-01. Score: 2
  
  Thanks. The problem seems to have come from not running the extension upgrade at /civicrm/admin/extensions/upgrade?reset=1
  
  After doing that civicrm\_search\_segment is back.
  
  
  ---
  
  