Answers.Body: <p>I think this might be the issue.
  As posted here: <a href="https://dba.stackexchange.com/questions/132951/cant-default-date-to-current-timestamp-in-mysql-5-5">https://dba.stackexchange.com/questions/132951/cant-default-date-to-current-timestamp-in-mysql-5-5</a>
  Versions of MySQL from 5.6.x will support this, but I'm currently running 5.5.62 which does not support CURRENT_TIMESTAMP as a default option for a DATETIME. It suggests setting the column type as a TIMESTAMP. I wonder if that will break the extension, though?
  Interesting, as I though CiviCRM was now using TIMESTAMP by default across the board.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-26T12:59:14.087Z
Answers.LastActivityDate: 2019-04-26T12:59:14.087Z
Answers.UserDisplayName: Graham
Body: <p>I had v2 of the CiviMobile extension installed on a WP/Civi site for testing to see how the mobile app would perform. I see that a new version of the app and the extension has been released, so tried to update the extension and just keep getting a fatal error. Looking at the log, it appears to be caused by an incorrect default value that the extension is trying to set in the 'civicrm_contact_push_notification_messages' table:</p>
  
  <pre><code>   string(986) "CREATE TABLE IF NOT EXISTS  `civicrm_contact_push_notification_messages` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `contact_id` int(10) unsigned NOT NULL,
    `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `entity_id` int(11) DEFAULT NULL,
    `send_date` datetime DEFAULT CURRENT_TIMESTAMP,
    `is_read` tinyint(4) DEFAULT '0',
  </code></pre>
  
  <p>How can I address this and get the extension installed?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-26T09:10:56.833Z
Comments.Text: can you add the db error you get when upgrading the extension?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-26T12:41:41.947Z
Comments.Text: I see this line:   CONSTRAINT `FK_civicrm_contact_push_notification_message` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci [nativecode=1067 ** Invalid default value for 'send_date']" (sorry, thought I'd included this in the original post).
Comments.UserDisplayName: Graham
Tags: <extension>
Title: How can I update the CiviMobile 2.0 extension to the CiviMobileAPI 3.0 extension?
ThreadText: # How can I update the CiviMobile 2.0 extension to the CiviMobileAPI 3.0 extension?
  
  (Asked by: username_0 on 2019-04-26)
  
  I had v2 of the CiviMobile extension installed on a WP/Civi site for testing to see how the mobile app would perform. I see that a new version of the app and the extension has been released, so tried to update the extension and just keep getting a fatal error. Looking at the log, it appears to be caused by an incorrect default value that the extension is trying to set in the 'civicrm\_contact\_push\_notification\_messages' table:
  
  ```
     string(986) "CREATE TABLE IF NOT EXISTS  `civicrm_contact_push_notification_messages` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `contact_id` int(10) unsigned NOT NULL,
    `message` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `entity_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `entity_id` int(11) DEFAULT NULL,
    `send_date` datetime DEFAULT CURRENT_TIMESTAMP,
    `is_read` tinyint(4) DEFAULT '0',
  
  ```
  
  How can I address this and get the extension installed?
  
  **Tags:** extension
  
  > **Comments:**
  > **username_1**: can you add the db error you get when upgrading the extension?  
  > **username_0**: I see this line:   CONSTRAINT `FK_civicrm_contact_push_notification_message` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci [nativecode=1067 ** Invalid default value for 'send_date']" (sorry, thought I'd included this in the original post).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-04-26. Score: 1
  
  I think this might be the issue.
  As posted here: <https://dba.stackexchange.com/questions/132951/cant-default-date-to-current-timestamp-in-mysql-5-5>
  Versions of MySQL from 5.6.x will support this, but I'm currently running 5.5.62 which does not support CURRENT\_TIMESTAMP as a default option for a DATETIME. It suggests setting the column type as a TIMESTAMP. I wonder if that will break the extension, though?
  Interesting, as I though CiviCRM was now using TIMESTAMP by default across the board.
  
  
  ---
  
  