Hi there,

When I upgraded the update 6008 failed with the following error:

  • warning: pg_query() [function.pg-query]: Query failed: ERROR: value for domain smallint_unsigned violates check constraint "smallint_unsigned_check" in /usr/clients/www/drupal/includes/database.pgsql.inc on line 185.
  • user warning: query: UPDATE uc_recurring_extensions set rebill_attempt=rebill_attempt-1 in /usr/clients/www/drupal/sites/all/modules/uc_recurring/uc_recurring.install on line 495.

So I checked a little closer and I saw that uc_recurring_extensions was initialized with 3 entries numbered 1, 2 and 3. And that UPDATE changes these numbers from 1, 2, 3 to 0, 1, 2. Good. Now, why we got the error, I'm not too sure. I'm using PostgreSQL...

In any event, I'm not too worried about this error in itself, what I'm posting about is the uc_recurring_install(). It is still inserting using 1, 2 and 3, when from what I understand, you should have changed it to 0, 1, 2 instead.

  [...]
  // I cut the string to show it on 3 lines, it is correct in the source.
  db_query("INSERT INTO {uc_recurring_extensions}
     (pfid, rebill_attempt, time_to_extend)
     VALUES (NULL, 1, %d), (NULL, 2, %d), (NULL, 3, 0)", $three_days, $five_days);
  [...]

Ain't that wrong?

Thank you.
Alexis Wilke

Comments

univate’s picture

Status: Active » Fixed

Not sure about the PostgreSQL

But fixed the install, thanks.

Status: Fixed » Closed (fixed)

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