drush updatedb keeps on telling me that

The following updates are pending:
privatemsg module : 
  7004 -   Remove duplicate entries in {pm_index}. 
  7005 -   Add primary key to {pm_index}.

Do you wish to run all pending updates? (y/n): y
'all' cache was cleared                                                                                                                     [success]
Finished performing updates.                                                                                                                [ok]

But when I run drush updatedb again I get exactly the same.

From update.php I get the following:

2 PENDING UPDATES (0 TO BE APPLIED, 2 SKIPPED)
privatemsg module

7004 - Remove duplicate entries in {pm_index}.
This update will been skipped due to the following missing dependencies: privatemsg_filter_update_7001
7005 - Add primary key to {pm_index}.
This update will been skipped due to the following missing dependencies: privatemsg_filter_update_7001
CommentFileSizeAuthor
#1 fix_dependency.patch800 bytesberdir

Comments

berdir’s picture

Status: Active » Needs review
StatusFileSize
new800 bytes

I guess you don't have privatemsg_filter.module enabled?

The problem is that these update functions have a dependency on a privatemsg_filter update function but only if that module is enabled. That is currently however not checked. The attached patch should fix this.

Please try the attached patch.

berdir’s picture

Status: Needs review » Fixed

Commited, thanks for reporting.

okokokok’s picture

This gets me through update.php...

drush updatedb still didn't want to do anything.
update.php runs but gave me:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'PrivatemsgAPITestCase-class' for key 1: INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4), (:db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9), (:db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14), (:db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19), (:db_insert_placeholder_20, :db_insert_placeholder_21, :db_insert_placeholder_22, :db_insert_placeholder_23, :db_insert_placeholder_24); Array ( [:db_insert_placeholder_0] => PrivatemsgTestCase [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/privatemsg/privatemsg.test [:db_insert_placeholder_3] => privatemsg [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => PrivatemsgFieldsTestCase [:db_insert_placeholder_6] => class [:db_insert_placeholder_7] => sites/all/modules/privatemsg/privatemsg.test [:db_insert_placeholder_8] => privatemsg [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => PrivatemsgLinksTestCase [:db_insert_placeholder_11] => class [:db_insert_placeholder_12] => sites/all/modules/privatemsg/privatemsg.test [:db_insert_placeholder_13] => privatemsg [:db_insert_placeholder_14] => 0 [:db_insert_placeholder_15] => PrivatemsgTokenTestCase [:db_insert_placeholder_16] => class [:db_insert_placeholder_17] => sites/all/modules/privatemsg/privatemsg.test [:db_insert_placeholder_18] => privatemsg [:db_insert_placeholder_19] => 0 [:db_insert_placeholder_20] => PrivatemsgAPITestCase [:db_insert_placeholder_21] => class [:db_insert_placeholder_22] => sites/all/modules/privatemsg/privatemsg.test [:db_insert_placeholder_23] => privatemsg [:db_insert_placeholder_24] => 0 ) in _registry_parse_file() (line 179 of /var/www/example.org/htdocs/includes/registry.inc).

Since the site is still in an experimental state I simply disabled, uninstalled and re-enabled privatemsg and pm_email_notify.

berdir’s picture

Title: Database update problem, probably with 7004 » Error because PrivatemsgAPITestCase has moved
Status: Fixed » Active

That class was moved from one file to another and the old file was deleted. This is imho a core bug,.

berdir’s picture

Status: Active » Fixed

I've found the problem, I forgot to update the .info file.

Wait until the -dev release is rebuilt and then try again. There will probably be a new release soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.