Body: <p>The process to upgrade my civiCRM database from 4.7.11 to 4.7.13 terminated with the following error:</p>
  
  <pre><code>[Error: Upgrade DB to 4.7.13: SQL]
  Error Field Error Value
  Type    DB_Error
  Code    -19
  Message DB Error: no such field
  Mode    16
  UserInfo    ALTER TABLE `civicrm_price_field_value` CHANGE `deductible_amount` `non_deductible_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'Portion of total amount which is NOT tax deductible.' [nativecode=1054 ** Unknown column 'deductible_amount' in 'civicrm_price_field_value']
  DebugInfo   ALTER TABLE `civicrm_price_field_value` CHANGE `deductible_amount` `non_deductible_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'Portion of total amount which is NOT tax deductible.' [nativecode=1054 ** Unknown column 'deductible_amount' in 'civicrm_price_field_value']
  PEAR_Exception: DB Error: no such field in unknown on line unknown
  - DB_Error: DB Error: no such field in unknown on line unknown
  </code></pre>
  
  <p>How can I fix this?
  EDIT
  As per question, the table structure is:</p>
  
  <pre><code>    +-----------------------+------------------+------+-----+---------+----------------+
  | id                    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
  | price_field_id        | int(10) unsigned | NO   | MUL | NULL    |              |
  | name                  | varchar(255)     | YES  |     | NULL    |              |
  | label                 | varchar(255)     | YES  |     | NULL    |              |
  | description           | text             | YES  |     | NULL    |              |
  | amount                | varchar(512)     | NO   |     | NULL    |              |
  | count                 | int(10) unsigned | YES  |     | NULL    |              |
  | max_value             | int(10) unsigned | YES  |     | NULL    |              |
  | weight                | int(11)          | YES  |     | 1       |              |
  | membership_type_id    | int(10) unsigned | YES  | MUL | NULL    |              |
  | membership_num_terms  | int(10) unsigned | YES  |     | NULL    |              |
  | is_default            | tinyint(4)       | YES  |     | 0       |              |
  | is_active             | tinyint(4)       | YES  |     | 1       |              |
  | financial_type_id     | int(10) unsigned | YES  | MUL | NULL    |              |
  | non_deductible_amount | decimal(20,2)    | NO   |     | 0.00    |              |
  | help_pre              | text             | YES  |     | NULL    |              |
  | help_post             | text             | YES  |     | NULL    |              |
  +-----------------------+------------------+------+-----+---------+----------------+
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-23T17:21:20.037Z
Comments.Text: Do you know how to view your MySQL tables?  Can you update your question with whether either (or neither) of the fields `deductible_amount` and `non_deductible_amount` are present in the `civicrm_price_field_value` table?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-23T21:43:52.870Z
Comments.Text: I haven't been able to get phpMyAdmin running properly on this server, (the login page outputs html but the screen is blank) - but when I'm next at a computer with shell access I will figure out how to do that via MySQL console.
Comments.UserDisplayName: Richard Grevers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-24T14:43:24.647Z
Comments.Text: The SQL is `DESCRIBE civicrm_price_field_value`.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-24T16:36:30.103Z
Comments.Text: So the update is failing because it has already happened?
Comments.UserDisplayName: Richard Grevers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-30T22:50:54.737Z
Comments.Text: Correct - that particular update step has already gone through. Fixing it is ugly but possible, depending ...
Comments.UserDisplayName: Alan Dixon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-24T09:17:15.960Z
Comments.Text: Is there a way to implement a query in the CiviCRM upgrade scripts that tells MySQL to go ahead and skip queries that fail due to already being executed? Is this a simplistic idea? I saw someone pose a similar question in SO: http://stackoverflow.com/questions/1869833/re-runnable-mysql-upgrade-script
Comments.UserDisplayName: Christia
Tags: <upgrade><database>
Title: Database upgrade error - 4.7.13
ThreadText: # Database upgrade error - 4.7.13
  
  (Asked by: username_0 on 2016-11-23)
  
  The process to upgrade my civiCRM database from 4.7.11 to 4.7.13 terminated with the following error:
  [Error: Upgrade DB to 4.7.13: SQL]
  Error Field Error Value
  Type    DB_Error
  Code    -19
  Message DB Error: no such field
  Mode    16
  UserInfo    ALTER TABLE `civicrm_price_field_value` CHANGE `deductible_amount` `non_deductible_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'Portion of total amount which is NOT tax deductible.' [nativecode=1054 ** Unknown column 'deductible_amount' in 'civicrm_price_field_value']
  DebugInfo   ALTER TABLE `civicrm_price_field_value` CHANGE `deductible_amount` `non_deductible_amount` DECIMAL( 20, 2 ) NOT NULL DEFAULT '0.00' COMMENT 'Portion of total amount which is NOT tax deductible.' [nativecode=1054 ** Unknown column 'deductible_amount' in 'civicrm_price_field_value']
  PEAR_Exception: DB Error: no such field in unknown on line unknown
  - DB_Error: DB Error: no such field in unknown on line unknown
  
  How can I fix this?
  EDIT
  As per question, the table structure is:
      +-----------------------+------------------+------+-----+---------+----------------+
  | id                    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
  | price_field_id        | int(10) unsigned | NO   | MUL | NULL    |              |
  | name                  | varchar(255)     | YES  |     | NULL    |              |
  | label                 | varchar(255)     | YES  |     | NULL    |              |
  | description           | text             | YES  |     | NULL    |              |
  | amount                | varchar(512)     | NO   |     | NULL    |              |
  | count                 | int(10) unsigned | YES  |     | NULL    |              |
  | max_value             | int(10) unsigned | YES  |     | NULL    |              |
  | weight                | int(11)          | YES  |     | 1       |              |
  | membership_type_id    | int(10) unsigned | YES  | MUL | NULL    |              |
  | membership_num_terms  | int(10) unsigned | YES  |     | NULL    |              |
  | is_default            | tinyint(4)       | YES  |     | 0       |              |
  | is_active             | tinyint(4)       | YES  |     | 1       |              |
  | financial_type_id     | int(10) unsigned | YES  | MUL | NULL    |              |
  | non_deductible_amount | decimal(20,2)    | NO   |     | 0.00    |              |
  | help_pre              | text             | YES  |     | NULL    |              |
  | help_post             | text             | YES  |     | NULL    |              |
  +-----------------------+------------------+------+-----+---------+----------------+
  
  **Tags:** upgrade, database
  
  > **Comments:**
  > **username_1**: Do you know how to view your MySQL tables?  Can you update your question with whether either (or neither) of the fields `deductible_amount` and `non_deductible_amount` are present in the `civicrm_price_field_value` table?  
  > **username_0**: I haven't been able to get phpMyAdmin running properly on this server, (the login page outputs html but the screen is blank) - but when I'm next at a computer with shell access I will figure out how to do that via MySQL console.  
  > **username_1**: The SQL is `DESCRIBE civicrm_price_field_value`.  
  > **username_0**: So the update is failing because it has already happened?  
  > **username_2**: Correct - that particular update step has already gone through. Fixing it is ugly but possible, depending ...  
  > **username_3**: Is there a way to implement a query in the CiviCRM upgrade scripts that tells MySQL to go ahead and skip queries that fail due to already being executed? Is this a simplistic idea? I saw someone pose a similar question in SO: http://stackoverflow.com/questions/1869833/re-runnable-mysql-upgrade-script  
  
  ---
  
  ## 0 answers
  
  