Updated to 7.x.-3.0-rc4 from rc3.
Keep running update.php, and always getting 2 pending updates Over and Over:

services module
7303 - Update 7303 adds the possibility to configure server settings on a per-endpoint basis. and sets upgrades all new servers to have at least services session enabled.
7399 - Update 7304 removes the title as it is no longer used

I've reverted back to rc3 (went away), reinstalled rc4 (came back with same behaviour). Do I need to go into the database to manually fix this or ...?

Thanks,
Marc

"You spin me right round, baby, right round
like a record baby, right round round round."

Comments

marcingy’s picture

Status: Active » Closed (duplicate)

Sounds like a duplicate of http://drupal.org/node/1233010 as services just uses core update functionality

wedge’s picture

Version: 7.x-3.0-rc4 » 7.x-3.0-rc5

I'm seeing the same thing. I think it's a core issue with postgresql. Are you using this marcjohnson?
I'm getting the following message the first time I run update.php:
Failed: PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR: column "server_settings" contains null values: ALTER TABLE {services_endpoint} ALTER server_settings SET NOT NULL; Array ( ) in db_add_field() (line 2781 of /Users/ottob/Sites/drupal7/includes/database/database.inc).

The next time it says that the server_settings column already exists, which it does. But only as bytea, no constraints or description.

If I modify includes/database/pgsql/schema.inc about line 371 like this:

     if ($fixnull) {
+      $this->connection->query("UPDATE {" . $table . "} SET $field = ''::bytea");
       $this->connection->query("ALTER TABLE {" . $table . "} ALTER $field SET NOT NULL");
     }

I'm a bit short on time right now, but will create a proper issue for core soon.

claudiu.cristea’s picture

Title: 7303 and 7399 via updates.php Over and Over » 7303 update fails
Assigned: Unassigned » claudiu.cristea
Status: Closed (duplicate) » Active

It's not duplicate of #1233010: 7.7 update did NOT update!. Reopened.

This is caused because the new field is forced to be NOT NULL.

   'not null' => TRUE,
claudiu.cristea’s picture

Version: 7.x-3.0-rc5 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new860 bytes

Here's a patch. Delete the field "server_settings" from "services_endpoint" if exists before rerunning the update script.

wedge’s picture

But isn't it reasonable to have the server_settings fields as NOT NULL? In core for instance the parameters fields of the actions table is also bytea NOT NULL. Your solution feels more like a workaround.

wedge’s picture

claudiu.cristea’s picture

While there are endpoints that doesn't have "server_settings" it seems reasonable for me to allow NULLs for this field. So, not only a workaround...

wedge’s picture

StatusFileSize
new350 bytes

This should work if keeping not null is preferred. See Damiens comment in #1240304: addField issue with not null blobs on PostgreSQL.

claudiu.cristea’s picture

I don't see the reason of having this field as NOT NULL while there are records where "server_settings" is N/A (the real world "N/A" has to be read as "NULL" in the virtual world). Don't want to insist more on this subject...

sumitk’s picture

Same with me

Log says:

The following updates returned messages
services module
Update #7303

    Failed: PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'server_settings' at row 1: ALTER TABLE {services_endpoint} CHANGE `server_settings` `server_settings` LONGBLOB NOT NULL COMMENT 'The server settings for the endpoint.'; Array ( ) in db_add_field() (line 2781 of includes/database/database.inc).


marcingy’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

After reading damz comments I'm happy to rbtc this and bumping to major as this blocks an upgrade path.

kylebrowning’s picture

Im at a conference until monday, Marcingy if you want to commit, go for it.

kylebrowning’s picture

Status: Reviewed & tested by the community » Closed (fixed)