← Back to team overview

mahara-contributors team mailing list archive

[Bug 1700893] Re: Upgrade to 17.04 fails on Postgres 8

 

** Description changed:

  Me again (https://bugs.launchpad.net/mahara/+bug/1517658).
  
- Upgrading from 15.10.1 to mahara-17.04.2.
+ Upgrading from 15.10.1 to mahara-17.04.2. (Postgres 8.4.)
  Running upgrade.php, auth.webservice step results in "Failed to upgrade."
  
  Apache error Log (xxxx = redacted):
  ----------------------------------
  xxxx [DBG] da (lib/dml.php:157) postgres8 error: [-1: ERROR:  function left(character varying, integer) does not exist at character 73, referer: xxxx
  xxxx [DBG] da (lib/dml.php:157) HINT:  No function matches the given name and argument types. You might need to add explicit type casts.] in adodb_throw(UPDATE "external_functions", referer: xxxx
  ----------------------------------
  
+ Looks like it's here:
+ auth/webservice/db/upgrade.php:518
+ --------------------------------------------------
+ execute_sql(
+             "UPDATE {external_functions}
+             SET
+                 component = LEFT(
+                     component,
+                     LENGTH(component) - {$length}
+                 )
+             WHERE
+                 component <> 'webservice'
+                 AND RIGHT(
+                     component,
+                     {$length}
+                 ) = '{$oldtail}'
+             "
+         );
+ --------------------------------------------------
+ 
+ Apparently functions left() and right() appeared in pg 9.3.
+ 
  Is there a workaround for this on pg8?
  
  Cheers,
  Marcus

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1700893

Title:
  Upgrade to 17.04 fails on Postgres 8

Status in Mahara:
  New

Bug description:
  Me again (https://bugs.launchpad.net/mahara/+bug/1517658).

  Upgrading from 15.10.1 to mahara-17.04.2. (Postgres 8.4.)
  Running upgrade.php, auth.webservice step results in "Failed to upgrade."

  Apache error Log (xxxx = redacted):
  ----------------------------------
  xxxx [DBG] da (lib/dml.php:157) postgres8 error: [-1: ERROR:  function left(character varying, integer) does not exist at character 73, referer: xxxx
  xxxx [DBG] da (lib/dml.php:157) HINT:  No function matches the given name and argument types. You might need to add explicit type casts.] in adodb_throw(UPDATE "external_functions", referer: xxxx
  ----------------------------------

  Looks like it's here:
  auth/webservice/db/upgrade.php:518
  --------------------------------------------------
  execute_sql(
              "UPDATE {external_functions}
              SET
                  component = LEFT(
                      component,
                      LENGTH(component) - {$length}
                  )
              WHERE
                  component <> 'webservice'
                  AND RIGHT(
                      component,
                      {$length}
                  ) = '{$oldtail}'
              "
          );
  --------------------------------------------------

  Apparently functions left() and right() appeared in pg 9.3.

  Is there a workaround for this on pg8?

  Cheers,
  Marcus

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1700893/+subscriptions


References